[PATCH] D23273: [ARM] Improve tests for sxta{b|h} and uxta{b|h} instructions for Thumb

Sam Parker via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 01:37:55 PDT 2016


samparker added inline comments.

================
Comment at: lib/Target/ARM/ARMInstrThumb2.td:1993
@@ +1992,3 @@
+                       (t2SXTAH rGPR:$Rn, rGPR:$Rm, rot_imm:$rot)>;
+def : Thumb2ExtractPat<(add rGPR:$Rn, (sra (shl (srl rGPR:$Rm, rot_imm:$rot),
+                                                (i32 16)),
----------------
t.p.northover wrote:
> Shouldn't `rot_imm` be `imm8_or_16` since we're producing an `SXTAH`? Specifically, we're only matching an `srl` not a `rol` so an shifting by 24 will give the wrong answer.
ah cheers, I forgot I left this in.

================
Comment at: test/CodeGen/Thumb2/thumb2-sxt-uxt.ll:32
@@ +31,3 @@
+
+define i32 @test5(i32 %a, i8 %b) {
+; CHECK-LABEL: test5:
----------------
t.p.northover wrote:
> None of these tests are hitting the non-zero rotation cases.
I wasn't planning on touching the rotation patterns yet, but I will now.


https://reviews.llvm.org/D23273





More information about the llvm-commits mailing list