[PATCH] D50030: [ARM] Adjust AND immediates to make them cheaper to select.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 11:38:21 PDT 2018
efriedma added a comment.
Sure, I can add a few more tests.
================
Comment at: test/CodeGen/ARM/Windows/vla.ll:17
; CHECK-SMALL-CODE: adds [[R4:r[0-9]+]], #7
-; CHECK-SMALL-CODE: bic [[R4]], [[R4]], #7
+; CHECK-SMALL-CODE: bic [[R4]], [[R4]], #4
; CHECK-SMALL-CODE: lsrs r4, [[R4]], #2
----------------
samparker wrote:
> Just a bug in the existing test case?
The new transform prefers the immediate ~4 over the immediate ~7 because it has more bits set. They're equivalent here because the two low bits get shifted out anyway. Maybe the transform should be adjusted to prefer ~7?
Repository:
rL LLVM
https://reviews.llvm.org/D50030
More information about the llvm-commits
mailing list