[PATCH] D149592: [InstCombine] Fix bug in `FoldOpIntoSelect` where we would incorrectly fold `undef` as constant
    Nikita Popov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May  1 08:56:54 PDT 2023
    
    
  
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1044
+               Pred == (IsTrueArm ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE) &&
+               !C->containsUndefOrPoisonElement()) {
       // Pass
----------------
I think this needs to use isGuaranteedNotToBeUndefOrPoison to handle constant expressions correctly.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149592/new/
https://reviews.llvm.org/D149592
    
    
More information about the llvm-commits
mailing list