[PATCH] D144840: [ConstraintElimination] Add tests to check for type bounds optimisation from zext instructions
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 01:45:24 PDT 2023
fhahn added inline comments.
================
Comment at: llvm/test/Transforms/ConstraintElimination/type-bounds.ll:60
+ %cmp.2 = icmp ult i32 %a.ext, %b
+ call void @use(i1 %cmp.2)
+ ret void
----------------
it's simpler to just return an `i1` instead, this also makes verification easier.
================
Comment at: llvm/test/Transforms/ConstraintElimination/type-bounds.ll:182
+}
+define void @zext_cmp_vector_bounds(<2 x i8> %a, <2 x i32> %b) {
+; CHECK-LABEL: @zext_cmp_vector_bounds(
----------------
nit: newline above.
================
Comment at: llvm/test/Transforms/ConstraintElimination/type-bounds.ll:325
+ %add.ext = zext i8 %add to i32
+ %cmp.1 = icmp ugt i32 %c, 255
+ br i1 %cmp.1, label %cond, label %exit
----------------
could you also add a variant where we compare to a constant less than 255? And larger than 255?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144840/new/
https://reviews.llvm.org/D144840
More information about the llvm-commits
mailing list