[llvm] [InstCombine]PtrReplacer: Correctly handle select with unavailable operands (PR #148829)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 00:25:25 PDT 2025


================
@@ -0,0 +1,35 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=instcombine < %s | FileCheck %s
+
+; Crashed in IC PtrReplacer because an invalid select was generated with addrspace(4) and addrspace(5)
+; operands.
+
+define amdgpu_kernel void @eggs(ptr addrspace(4) byref([12 x i8]) align 16 %arg) {
----------------
Pierre-vh wrote:

In my defense, the first one came from `-passes=metarenamer` (which I always use on reduced test cases), but the second one is just me continuing the trend :smile: 

I'll update the test names

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


More information about the llvm-commits mailing list