[llvm] AMDGPU: Add baseline tests for bitcast + readlane intrinsics (PR #128493)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 04:20:49 PST 2025
================
@@ -6,8 +6,19 @@ define i32 @test_constant() {
; CHECK-LABEL: @test_constant(
; CHECK-NEXT: ret i32 99
;
- %call = call i32 @llvm.amdgcn.permlane64(i32 99)
+ %call = call i32 @llvm.amdgcn.permlane64.i32(i32 99)
ret i32 %call
}
-declare i32 @llvm.amdgcn.permlane64(i32)
+define i32 @test_bitcast_f32_to_i32_permlane64(float %val) {
+; CHECK-LABEL: @test_bitcast_f32_to_i32_permlane64(
+; CHECK-NEXT: [[BITCAST:%.*]] = bitcast float [[VAL:%.*]] to i32
+; CHECK-NEXT: [[RESULT:%.*]] = call i32 @llvm.amdgcn.permlane64.i32(i32 [[BITCAST]])
+; CHECK-NEXT: ret i32 [[RESULT]]
+;
+ %bitcast = bitcast float %val to i32
+ %result = call i32 @llvm.amdgcn.permlane64.i32(i32 %bitcast)
+ ret i32 %result
+}
+
+declare i32 @llvm.amdgcn.permlane64.i32(i32)
----------------
Pierre-vh wrote:
do we still need intrinsic declarations? Wasn't there a change to make them unnecessary?
https://github.com/llvm/llvm-project/pull/128493
More information about the llvm-commits
mailing list