[llvm] [llvm][NVPTX] Fix RAUW bug in NVPTXProxyRegErasure (PR #105871)

Jeff Niu via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 20:37:53 PDT 2024


================
@@ -23,3 +25,19 @@ define  <4 x i32> @check_vec_i32() {
   %ret = call <4 x i32> @callee_vec_i32()
   ret <4 x i32> %ret
 }
+
+; MIR: check_chained_proxy
+define void @check_chained_proxy(i8 %0) {
+  ; MIR: body:
+  ; MIR-BEFORE: %0:int32regs = ProxyRegI32 killed %4
+  %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %0, i64 0
+  %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer
+  br label %vector.body
+
+vector.body:
+  ; MIR-BEFORE: %5:int32regs = ProxyRegI32 %0
----------------
Mogball wrote:

I converted the test to MIR. This is way better. Thanks for explaining the best way to do it!

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


More information about the llvm-commits mailing list