[llvm] eaa2634 - [VE] Remove obsolete ANDrm patterns

Kazushi Marukawa via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 03:23:43 PDT 2022


Author: Kazushi (Jam) Marukawa
Date: 2022-09-21T19:23:34+09:00
New Revision: eaa263485d53c7f15dfe6228b285fde5c6194c25

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

LOG: [VE] Remove obsolete ANDrm patterns

Remove obsolete ANDrm patterns for MIMM operands.  We add these
translations to optimize commonly used cast operations before
we support MIMM operands directly by each isntruction.  Such
translations are obsolete now.

Reviewed By: efocht

Differential Revision: https://reviews.llvm.org/D134341

Added: 
    

Modified: 
    llvm/lib/Target/VE/VEInstrInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/VE/VEInstrInfo.td b/llvm/lib/Target/VE/VEInstrInfo.td
index 2722395ce90b..528bebd4276a 100644
--- a/llvm/lib/Target/VE/VEInstrInfo.td
+++ b/llvm/lib/Target/VE/VEInstrInfo.td
@@ -2264,17 +2264,6 @@ def : Pat<(i64 (bitconvert f64:$src)), (COPY_TO_REGCLASS $src, I64)>;
 def : Pat<(i32 (bitconvert f32:$op)), (l2i (SRALri (f2l $op), 32))>;
 def : Pat<(f32 (bitconvert i32:$op)), (l2f (SLLri (i2l $op), 32))>;
 
-// Optimize code A generated by `(unsigned char)c << 5` to B.
-// A) sla.w.sx %s0, %s0, 5
-//    lea %s1, 224           ; 0xE0
-//    and %s0, %s0, %s1
-// B) sla.w.sx %s0, %s0, 5
-//    and %s0, %s0, (56)0
-
-def : Pat<(i32 (and i32:$val, 0xff)), (l2i (ANDrm (i2l $val), !add(56, 64)))>;
-def : Pat<(i32 (and i32:$val, 0xffff)), (l2i (ANDrm (i2l $val), !add(48, 64)))>;
-def : Pat<(i64 (and i64:$val, 0xffffffff)), (ANDrm $val, !add(32, 64))>;
-
 //===----------------------------------------------------------------------===//
 // Vector Instruction Pattern Stuff
 //===----------------------------------------------------------------------===//


        


More information about the llvm-commits mailing list