[PATCH] D153148: [InstCombine] Fold `(-1 + A) & B` into `A ? 0 : B` where A is effectively a bool
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 08:17:27 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/binop-cast.ll:309
+ %ret = add i32 %res, %mask
+ ret i32 %ret
+}
----------------
Can you:
1) Split the tests to a seperate patch (create a series so that patch1 is the tests, patch2 is the impl). This allows us to see exact what changes the impl causes
2) Can you add a negative test where the load range is out of range (maybe 0-3)
3) Can you add a test where `%x` is the same as `%y` and the 0/1 range is created using `and`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153148/new/
https://reviews.llvm.org/D153148
More information about the llvm-commits
mailing list