aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86InstrArithmetic.td
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-01-05 07:39:25 +0000
committerCraig Topper <craig.topper@gmail.com>2013-01-05 07:39:25 +0000
commit835e7bc48e101d92c8bbabf0b52cdcfe35b99c01 (patch)
treee04d5570259ace4df2679fd038be85c51941ffed /lib/Target/X86/X86InstrArithmetic.td
parent5d1f5c17377e56d88a525cf82d02e6e5df254580 (diff)
Recommit r171461 which was incorrectly reverted. Mark DIV/IDIV instructions hasSideEffects=1 because they can trap when dividing by 0. This is needed to keep early if conversion from moving them across basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrArithmetic.td')
-rw-r--r--lib/Target/X86/X86InstrArithmetic.td2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrArithmetic.td b/lib/Target/X86/X86InstrArithmetic.td
index d56763ea9d..3540fc3125 100644
--- a/lib/Target/X86/X86InstrArithmetic.td
+++ b/lib/Target/X86/X86InstrArithmetic.td
@@ -266,7 +266,7 @@ def IMUL64rmi8 : RIi8<0x6B, MRMSrcMem, // GR64 = [mem64]*I8
// unsigned division/remainder
-let hasSideEffects = 0 in {
+let hasSideEffects = 1 in { // so that we don't speculatively execute
let Defs = [AL,EFLAGS,AX], Uses = [AX] in
def DIV8r : I<0xF6, MRM6r, (outs), (ins GR8:$src), // AX/r8 = AL,AH
"div{b}\t$src", [], IIC_DIV8_REG>;