OSDN Git Service

Remove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift...
authorJim Grosbach <grosbach@apple.com>
Wed, 28 Jul 2010 23:17:45 +0000 (23:17 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 28 Jul 2010 23:17:45 +0000 (23:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109693 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb2.td

index 8ba2376..c950fcb 100644 (file)
@@ -1352,8 +1352,12 @@ defm t2UXTH   : T2I_unary_rrot<0b001, "uxth",
 defm t2UXTB16 : T2I_unary_rrot_uxtb16<0b011, "uxtb16",
                                UnOpFrag<(and node:$Src, 0x00FF00FF)>>;
 
-def : T2Pat<(and (shl GPR:$Src, (i32 8)), 0xFF00FF),
-            (t2UXTB16r_rot GPR:$Src, 24)>, Requires<[HasT2ExtractPack]>;
+// FIXME: This pattern incorrectly assumes the shl operator is a rotate.
+//        The transformation should probably be done as a combiner action
+//        instead so we can include a check for masking back in the upper
+//        eight bits of the source into the lower eight bits of the result.
+//def : T2Pat<(and (shl GPR:$Src, (i32 8)), 0xFF00FF),
+//            (t2UXTB16r_rot GPR:$Src, 24)>, Requires<[HasT2ExtractPack]>;
 def : T2Pat<(and (srl GPR:$Src, (i32 8)), 0xFF00FF),
             (t2UXTB16r_rot GPR:$Src, 8)>, Requires<[HasT2ExtractPack]>;