[llvm] [InstCombine][AMDGPU] Disable PtrReplacer when select has mismatch AS. (PR #98456)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 10:43:32 PDT 2024


================
@@ -329,6 +374,15 @@ bool PointerReplacer::collectUsersRecursive(Instruction &I) {
         ValuesToRevisit.insert(Inst);
         continue;
       }
+
+      auto *TruePtr = dyn_cast<PointerType>(SI->getTrueValue()->getType());
+      auto *FalsePtr = dyn_cast<PointerType>(SI->getFalseValue()->getType());
----------------
arsenm wrote:

Select operands must be the same type. There is no situation where these can be different 

https://github.com/llvm/llvm-project/pull/98456


More information about the llvm-commits mailing list