[PATCH] D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2().
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 16:14:26 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:928
+ Value *B) -> Value * {
+ if (Compare->isSigned())
+ return Builder.CreateLShr(
----------------
This needs a comment as to why we're creating a node (in what pattern are we?)
================
Comment at: llvm/test/Transforms/InstCombine/onehot_merge.ll:246
; Should not fold
define i1 @foo1_and_extra_use_and(i32 %k, i32 %c1, i32 %c2, i32* %p) {
----------------
Looks like this one should?
================
Comment at: llvm/test/Transforms/InstCombine/onehot_merge.ll:316
; Should not fold
define i1 @foo1_and_extra_use_and2(i32 %k, i32 %c1, i32 %c2, i32* %p) {
----------------
Looks like this one should?
================
Comment at: llvm/test/Transforms/InstCombine/onehot_merge.ll:340
; Should not fold
define i1 @foo1_and_extra_use_cmp2(i32 %k, i32 %c1, i32 %c2, i1* %p) {
----------------
Could fold, no instruction count increase
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64275/new/
https://reviews.llvm.org/D64275
More information about the llvm-commits
mailing list