[llvm] [NVPTX] Avoid introducing unnecessary ProxyRegs and Movs in ISel (PR #120486)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 15:29:14 PST 2024
================
@@ -157,38 +157,38 @@ define i16 @test_v8i8(i64 %a) {
; CHECK-LABEL: test_v8i8(
; CHECK: {
; CHECK-NEXT: .reg .b16 %rs<16>;
-; CHECK-NEXT: .reg .b32 %r<14>;
+; CHECK-NEXT: .reg .b32 %r<12>;
; CHECK-NEXT: .reg .b64 %rd<2>;
; CHECK-EMPTY:
; CHECK-NEXT: // %bb.0:
; CHECK-NEXT: ld.param.u64 %rd1, [test_v8i8_param_0];
-; CHECK-NEXT: cvt.u32.u64 %r1, %rd1;
-; CHECK-NEXT: { .reg .b32 tmp; mov.b64 {tmp, %r2}, %rd1; }
-; CHECK-NEXT: bfe.s32 %r5, %r1, 0, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs1, %r5;
-; CHECK-NEXT: bfe.s32 %r6, %r1, 8, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs2, %r6;
-; CHECK-NEXT: bfe.s32 %r7, %r1, 16, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs3, %r7;
-; CHECK-NEXT: bfe.s32 %r8, %r1, 24, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs4, %r8;
-; CHECK-NEXT: bfe.s32 %r9, %r2, 0, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs5, %r9;
-; CHECK-NEXT: bfe.s32 %r10, %r2, 8, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs6, %r10;
-; CHECK-NEXT: bfe.s32 %r11, %r2, 16, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs7, %r11;
-; CHECK-NEXT: bfe.s32 %r12, %r2, 24, 8;
-; CHECK-NEXT: cvt.s8.s32 %rs8, %r12;
+; CHECK-NEXT: { .reg .b32 tmp; mov.b64 {tmp, %r1}, %rd1; }
+; CHECK-NEXT: cvt.u32.u64 %r2, %rd1;
----------------
Artem-B wrote:
Future improvement opportunity: Coalesce partial mov and cvt into `mov.b64 {%r2, %r1}, %rd1`.
https://github.com/llvm/llvm-project/pull/120486
More information about the llvm-commits
mailing list