https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/242278
The patterns for these intrinsics rely on ldl.zx clearing the high 32 bits of the register, but used INSERT_SUBREG into an IMPLICIT_DEF of its i32 result, which claims that the high 32 bits are undefined. Use the variant of ldl.zx that defines the whole 64-bit register instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub> >From f4d0ad8d4cc77ab43d3be5396dea53c377cd34ac Mon Sep 17 00:00:00 2001 From: Jay Foad <[email protected]> Date: Fri, 13 Nov 2026 12:03:10 +0000 Subject: [PATCH] [VE] Use the 64-bit ldl.zx for the pack_f32p and pack_f32a intrinsics. NFC. The patterns for these intrinsics rely on ldl.zx clearing the high 32 bits of the register, but used INSERT_SUBREG into an IMPLICIT_DEF of its i32 result, which claims that the high 32 bits are undefined. Use the variant of ldl.zx that defines the whole 64-bit register instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> --- llvm/lib/Target/VE/VEInstrIntrinsicVL.td | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/VE/VEInstrIntrinsicVL.td b/llvm/lib/Target/VE/VEInstrIntrinsicVL.td index fca0572cf9b14..9c7d68f1f1be0 100644 --- a/llvm/lib/Target/VE/VEInstrIntrinsicVL.td +++ b/llvm/lib/Target/VE/VEInstrIntrinsicVL.td @@ -5,11 +5,11 @@ // Pack patterns. def : Pat<(i64 (int_ve_vl_pack_f32p ADDRrii:$addr0, ADDRrii:$addr1)), (ORrr (f2l (LDUrii MEMrii:$addr0)), - (i2l (LDLZXrii MEMrii:$addr1)))>; + (LDLZX64rii MEMrii:$addr1))>; def : Pat<(i64 (int_ve_vl_pack_f32a ADDRrii:$addr)), (MULULrr - (i2l (LDLZXrii MEMrii:$addr)), + (LDLZX64rii MEMrii:$addr), (LEASLrii (ANDrm (LEAzii 0, 0, (LO32 (i64 0x0000000100000001))), !add(32, 64)), 0, (HI32 (i64 0x0000000100000001))))>; _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
