[PATCH] D103788: [InstCombine] Eliminate casts to optimize ctlz operation
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 7 01:17:02 PDT 2021
RKSimon added reviewers: lebedev.ri, spatel.
RKSimon added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll:11
+declare i32 @llvm.ctlz.i32 (i32, i1);
+declare i16 @llvm.ctlz.i16 (i16, i1);
+
----------------
Drop the ;
================
Comment at: llvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll:13
+
+define i16 @src0(i16 %x) {
+; CHECK-LABEL: @src0(
----------------
please can you use descriptive test names - @src0 etc. don't give themselves to searching (or when variant tests get added in the middle of the file...).
@trunc_ctlz_zext_i32 etc. would be better
================
Comment at: llvm/test/Transforms/InstCombine/zext-ctlz-trunc-to-ctlz-add.ll:71
+ ret i16 %zz
+}
----------------
We need vector type coverage as well - at least fixed vectors, scalable vectors as well would be a bonus
declare <2 x i32> @llvm.ctlz.v2i32 (<2 x i32>, i1)
declare <vscale x 2 x i32> @llvm.ctlz.v2i32 (<vscale x 2 x i32>, i1)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103788/new/
https://reviews.llvm.org/D103788
More information about the llvm-commits
mailing list