[PATCH] D49585: [ARM] Prefer lsls+lsrs over lsls+ands or lsrs+ands in Thumb1.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 10:33:07 PDT 2018


efriedma added inline comments.


================
Comment at: test/CodeGen/Thumb/shift-and.ll:97
+
+define i32 @test8(i32 %x) {
+; CHECK-LABEL: test8:
----------------
samparker wrote:
> This is the same as the above test. Also, can't this be combined to (shl (lshr %x, 31), 2)?
Oh, oops; I think I meant to change the shift amount between the two tests.

Yes, it can be combined; this is one of the "reversed" patterns I added a FIXME for (the patch currently only produces shl+lshr, not lshr+shl).


Repository:
  rL LLVM

https://reviews.llvm.org/D49585





More information about the llvm-commits mailing list