summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-03-25 06:53:44 +0000
committerCraig Topper <craig.topper@intel.com>2019-03-25 06:53:44 +0000
commit3810e35d3fa7b9b9d18d7171d3dc9fcc5c151ac9 (patch)
tree8cfb04ad96a965c99123a195bb51d42573222b8f /llvm/lib/Target
parent5b434468313bc070b30cd98624bf00ca0e809b22 (diff)
downloadbcm5719-llvm-3810e35d3fa7b9b9d18d7171d3dc9fcc5c151ac9.tar.gz
bcm5719-llvm-3810e35d3fa7b9b9d18d7171d3dc9fcc5c151ac9.zip
[X86] Remove GetLo8XForm and use GetLo32XForm instead. NFCI
We were using this to create an AND32ri8 node from a 64-bit and, but that node normally still uses a 32-bit immediate. So we should just truncate the existing immediate to i32. We already verified it has the same value in bits 31:7. llvm-svn: 356868
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/X86/X86InstrCompiler.td7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86InstrCompiler.td b/llvm/lib/Target/X86/X86InstrCompiler.td
index 4c06b176543..7aab8f8f377 100644
--- a/llvm/lib/Target/X86/X86InstrCompiler.td
+++ b/llvm/lib/Target/X86/X86InstrCompiler.td
@@ -19,11 +19,6 @@ def GetLo32XForm : SDNodeXForm<imm, [{
return getI32Imm((uint32_t)N->getZExtValue(), SDLoc(N));
}]>;
-def GetLo8XForm : SDNodeXForm<imm, [{
- // Transformation function: get the low 8 bits.
- return getI8Imm((uint8_t)N->getZExtValue(), SDLoc(N));
-}]>;
-
//===----------------------------------------------------------------------===//
// Random Pseudo Instructions.
@@ -1523,7 +1518,7 @@ def : Pat<(and GR64:$src, i64immZExt32SExt8:$imm),
(i64 0),
(AND32ri8
(EXTRACT_SUBREG GR64:$src, sub_32bit),
- (i32 (GetLo8XForm imm:$imm))),
+ (i32 (GetLo32XForm imm:$imm))),
sub_32bit)>;
def : Pat<(and GR64:$src, i64immZExt32:$imm),
OpenPOWER on IntegriCloud