[llvm] [NVPTX] Avoid introducing unnecessary ProxyRegs and Movs in ISel (PR #120486)
Justin Fargnoli via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 14:47:46 PST 2024
================
@@ -1992,33 +1992,33 @@ define <2 x half> @test_copysign_f32(<2 x half> %a, <2 x float> %b) #0 {
; CHECK-F16-NEXT: cvt.rn.f16.f32 %rs1, %f2;
; CHECK-F16-NEXT: cvt.rn.f16.f32 %rs2, %f1;
; CHECK-F16-NEXT: mov.b32 %r2, {%rs2, %rs1};
-; CHECK-F16-NEXT: and.b32 %r4, %r2, -2147450880;
-; CHECK-F16-NEXT: and.b32 %r6, %r1, 2147450879;
-; CHECK-F16-NEXT: or.b32 %r7, %r6, %r4;
-; CHECK-F16-NEXT: st.param.b32 [func_retval0], %r7;
+; CHECK-F16-NEXT: and.b32 %r3, %r2, -2147450880;
+; CHECK-F16-NEXT: and.b32 %r4, %r1, 2147450879;
+; CHECK-F16-NEXT: or.b32 %r5, %r4, %r3;
+; CHECK-F16-NEXT: st.param.b32 [func_retval0], %r5;
; CHECK-F16-NEXT: ret;
;
; CHECK-NOF16-LABEL: test_copysign_f32(
; CHECK-NOF16: {
-; CHECK-NOF16-NEXT: .reg .b16 %rs<13>;
+; CHECK-NOF16-NEXT: .reg .b16 %rs<9>;
; CHECK-NOF16-NEXT: .reg .b32 %r<7>;
; CHECK-NOF16-NEXT: .reg .f32 %f<3>;
; CHECK-NOF16-EMPTY:
; CHECK-NOF16-NEXT: // %bb.0:
; CHECK-NOF16-NEXT: ld.param.v2.f32 {%f1, %f2}, [test_copysign_f32_param_1];
; CHECK-NOF16-NEXT: ld.param.b32 %r1, [test_copysign_f32_param_0];
+; CHECK-NOF16-NEXT: mov.b32 {%rs1, %rs2}, %r1;
+; CHECK-NOF16-NEXT: and.b16 %rs3, %rs2, 32767;
; CHECK-NOF16-NEXT: mov.b32 %r2, %f2;
; CHECK-NOF16-NEXT: and.b32 %r3, %r2, -2147483648;
-; CHECK-NOF16-NEXT: { .reg .b16 tmp; mov.b32 {tmp, %rs1}, %r3; }
-; CHECK-NOF16-NEXT: mov.b32 {%rs2, %rs3}, %r1;
-; CHECK-NOF16-NEXT: and.b16 %rs5, %rs3, 32767;
-; CHECK-NOF16-NEXT: or.b16 %rs6, %rs5, %rs1;
+; CHECK-NOF16-NEXT: { .reg .b16 tmp; mov.b32 {tmp, %rs4}, %r3; }
+; CHECK-NOF16-NEXT: or.b16 %rs5, %rs3, %rs4;
+; CHECK-NOF16-NEXT: and.b16 %rs6, %rs1, 32767;
; CHECK-NOF16-NEXT: mov.b32 %r4, %f1;
; CHECK-NOF16-NEXT: and.b32 %r5, %r4, -2147483648;
-; CHECK-NOF16-NEXT: { .reg .b16 tmp; mov.b32 {tmp, %rs8}, %r5; }
-; CHECK-NOF16-NEXT: and.b16 %rs10, %rs2, 32767;
-; CHECK-NOF16-NEXT: or.b16 %rs11, %rs10, %rs8;
-; CHECK-NOF16-NEXT: mov.b32 %r6, {%rs11, %rs6};
+; CHECK-NOF16-NEXT: { .reg .b16 tmp; mov.b32 {tmp, %rs7}, %r5; }
+; CHECK-NOF16-NEXT: or.b16 %rs8, %rs6, %rs7;
+; CHECK-NOF16-NEXT: mov.b32 %r6, {%rs8, %rs5};
----------------
justinfargnoli wrote:
Codegen diff
https://github.com/llvm/llvm-project/pull/120486
More information about the llvm-commits
mailing list