[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon May 20 09:20:00 PDT 2024


================
@@ -5433,7 +5450,16 @@ bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper,
                             ? Src0
                             : B.buildBitcast(LLT::scalar(Size), Src0).getReg(0);
     Src0 = B.buildAnyExt(S32, Src0Cast).getReg(0);
-    if (Src2.isValid()) {
+
+    if (IsPermLane16) {
+      Register Src1Cast =
+          MRI.getType(Src1).isScalar()
+              ? Src1
+              : B.buildBitcast(LLT::scalar(Size), Src2).getReg(0);
----------------
arsenm wrote:

Like the other patch, shouldn't need any bitcasts 

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


More information about the cfe-commits mailing list