[PATCH] D149404: [ValueTracking][InstCombine] Add a new API to allow to ignore poison generating flags or metadatas when implying poison

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 23:34:50 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2922
 
   auto *One = ConstantInt::getTrue(SelType);
   auto *Zero = ConstantInt::getFalse(SelType);
----------------
Imo this should be split into a sepera


================
Comment at: llvm/test/Transforms/InstCombine/ispow2.ll:917
 ; CHECK-LABEL: @is_pow2or0_ctpop_wrong_pred2_logical(
-; CHECK-NEXT:    ret i1 true
+; CHECK-NEXT:    [[T0:%.*]] = tail call i32 @llvm.ctpop.i32(i32 [[X:%.*]]), !range [[RNG0]]
+; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[T0]], 1
----------------
StephenFan wrote:
> I think this regression can be fixed If InstCombine matches this pattern. 
What changed in the impl that caused this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149404/new/

https://reviews.llvm.org/D149404



More information about the llvm-commits mailing list