[llvm] 08b275f - [X86] Remove unnecessary In64BitMode predicate from TEST64ri32. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 00:35:36 PDT 2020


Author: Craig Topper
Date: 2020-06-11T00:33:55-07:00
New Revision: 08b275f62e2721296d8f0cf234c8ea1c45e7fa91

URL: https://github.com/llvm/llvm-project/commit/08b275f62e2721296d8f0cf234c8ea1c45e7fa91
DIFF: https://github.com/llvm/llvm-project/commit/08b275f62e2721296d8f0cf234c8ea1c45e7fa91.diff

LOG: [X86] Remove unnecessary In64BitMode predicate from TEST64ri32. NFC

This appears to have been added when In64BitMode was added to a
bunch of instructions that don't have register operands. When an
instruction uses a register the parser will prevent a 64-bit
register from being parsed on a 32-bit target. But with only
memory and immediate operands this doesn't happen.

TEST64ri32 does have a register operand so the issue the predicate
was supposed to fix doesn't apply.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86InstrArithmetic.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86InstrArithmetic.td b/llvm/lib/Target/X86/X86InstrArithmetic.td
index 8bb3b755135b..d54b5d2b11a5 100644
--- a/llvm/lib/Target/X86/X86InstrArithmetic.td
+++ b/llvm/lib/Target/X86/X86InstrArithmetic.td
@@ -1247,7 +1247,6 @@ let isCompare = 1 in {
     def TEST8ri    : BinOpRI_F<0xF6, "test", Xi8 , X86testpat, MRM0r>;
     def TEST16ri   : BinOpRI_F<0xF6, "test", Xi16, X86testpat, MRM0r>;
     def TEST32ri   : BinOpRI_F<0xF6, "test", Xi32, X86testpat, MRM0r>;
-    let Predicates = [In64BitMode] in
     def TEST64ri32 : BinOpRI_F<0xF6, "test", Xi64, X86testpat, MRM0r>;
 
     def TEST8mi    : BinOpMI_F<0xF6, "test", Xi8 , X86testpat, MRM0m>;


        


More information about the llvm-commits mailing list