[llvm] [InstCombine] Don't folder select to or if value argument is user of invalid addrspacecast inst (PR #144686)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 20:03:29 PDT 2025
================
@@ -3194,8 +3194,23 @@ static Instruction *foldNestedSelects(SelectInst &OuterSelVal,
/// Return true if V is poison or \p Expected given that ValAssumedPoison is
/// already poison. For example, if ValAssumedPoison is `icmp samesign X, 10`
/// and V is `icmp ne X, 5`, impliesPoisonOrCond returns true.
-static bool impliesPoisonOrCond(const Value *ValAssumedPoison, const Value *V,
- bool Expected) {
+static bool impliesPoisonOrCond(
+ const Value *ValAssumedPoison, const Value *V, bool Expected,
+ llvm::function_ref<bool(unsigned, unsigned)> isValidAddrSpaceCast) {
----------------
wenju-he wrote:
done
https://github.com/llvm/llvm-project/pull/144686
More information about the llvm-commits
mailing list