summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-01-09 07:09:34 +0000
committerCraig Topper <craig.topper@intel.com>2018-01-09 07:09:34 +0000
commitdef1c30c668e098e98f04e2d6f8ed84ed1b0b564 (patch)
tree9c061127864b9c5699b7aaa64c218f2b17846ea9 /llvm/lib/Target/X86
parent6a7a4c6a55faef2da7e5f82bdf4c737095114564 (diff)
downloadbcm5719-llvm-def1c30c668e098e98f04e2d6f8ed84ed1b0b564.tar.gz
bcm5719-llvm-def1c30c668e098e98f04e2d6f8ed84ed1b0b564.zip
[X86] Allow more cmpps/pd immediate encodings to be commuted during isel.
The code that checks the immediate wasn't masking to the lower 3-bits like the code in X86InstrInfo.cpp that's used by the peephole pass does. llvm-svn: 322060
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/X86InstrSSE.td4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td
index 189fb46612e..30fca8ea1af 100644
--- a/llvm/lib/Target/X86/X86InstrSSE.td
+++ b/llvm/lib/Target/X86/X86InstrSSE.td
@@ -2398,8 +2398,8 @@ let Constraints = "$src1 = $dst" in {
}
def CommutableCMPCC : PatLeaf<(imm), [{
- return (N->getZExtValue() == 0x00 || N->getZExtValue() == 0x03 ||
- N->getZExtValue() == 0x04 || N->getZExtValue() == 0x07);
+ uint64_t Imm = N->getZExtValue() & 0x7;
+ return (Imm == 0x00 || Imm == 0x03 || Imm == 0x04 || Imm == 0x07);
}]>;
// Patterns to select compares with loads in first operand.
OpenPOWER on IntegriCloud