[PATCH] D126638: [CGP] Also freeze ctlz/cttz operand when despeculating
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 07:15:06 PDT 2022
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
https://alive2.llvm.org/ce/z/iwd4ba
This is needed for correctness, so LGTM.
It might be good to add tests for other targets. I didn't step through this to see why, but the code for AArch and ARM actually looks better when we re-use the frozen value.
rbit w9, w0
mov w8, #32
clz w9, w9
cmp w0, #0
csel w0, w8, w9, eq
vs.
rbit w8, w0
clz w0, w8
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126638/new/
https://reviews.llvm.org/D126638
More information about the llvm-commits
mailing list