From 3810e35d3fa7b9b9d18d7171d3dc9fcc5c151ac9 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 25 Mar 2019 06:53:44 +0000 Subject: [PATCH] [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 --- llvm/lib/Target/X86/X86InstrCompiler.td | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/llvm/lib/Target/X86/X86InstrCompiler.td b/llvm/lib/Target/X86/X86InstrCompiler.td index 4c06b17..7aab8f8 100644 --- a/llvm/lib/Target/X86/X86InstrCompiler.td +++ b/llvm/lib/Target/X86/X86InstrCompiler.td @@ -19,11 +19,6 @@ def GetLo32XForm : SDNodeXFormgetZExtValue(), SDLoc(N)); }]>; -def GetLo8XForm : SDNodeXFormgetZExtValue(), 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), -- 2.7.4