[PATCH] D67021: [DAGCombiner] improve throughput of shift+logic+shift
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 17:12:29 PDT 2019
efriedma added inline comments.
================
Comment at: llvm/test/CodeGen/AArch64/bitfield-insert.ll:269
+; CHECK-NEXT: and w8, w0, #0xff
+; CHECK-NEXT: lsl w8, w8, #8
+; CHECK-NEXT: mov w9, w8
----------------
Not really related to your patch, but I'm surprised we aren't matching the and+lsl to ubfiz. Something odd going on with the zext, I guess: we lower the zext to a mask, but then don't switch the "and" with the shift like instcombine would. (Simplified example: "int a(unsigned char x) { return x*8; }", vs. "int a(int x) { return ((unsigned char)x)*8; }".)
If that gets fixed, it looks like this saves one instruction, maybe? Not sure what effect that fix would have on the old code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67021/new/
https://reviews.llvm.org/D67021
More information about the llvm-commits
mailing list