Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests compatible with upstream llvm #2865

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lgc/test/TaskShaderOps.lgc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
; CHECK-NEXT: [[newBaseAddrHi32:%[0-9]*]] = trunc i64 [[newBaseAddrHi64]] to i32
; CHECK-NEXT: [[newBaseAddrHi:%[0-9]*]] = and i32 [[newBaseAddrHi32]], 65535
; CHECK-NEXT: [[newDescWord1Tmp:%[0-9]*]] = and i32 [[descWord1]], -65536
; CHECK-NEXT: [[newDescWord1:%[0-9]*]] = or i32 [[newDescWord1Tmp]], [[newBaseAddrHi]]
; CHECK-NEXT: [[newDescWord1:%[0-9]*]] = or {{(disjoint )?}}i32 [[newDescWord1Tmp]], [[newBaseAddrHi]]
; CHECK-NEXT: [[newPayloadRingDescTmp:%[0-9]*]] = insertelement <4 x i32> [[payloadRingDesc]], i32 [[newDescWord0]], i64 0
; CHECK-NEXT: [[newPayloadRingDesc:%[0-9]*]] = insertelement <4 x i32> [[newPayloadRingDescTmp]], i32 [[newDescWord1]], i64 1
; CHECK: %{{[0-9]*}} = call i32 @llvm.amdgcn.raw.atomic.buffer.load.i32(<4 x i32> [[newPayloadRingDesc]], i32 %{{.*}}, i32 0, i32 5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
; SHADERTEST-LABEL: {{^// LLPC}} pipeline patching results
; SHADERTEST: define dllexport amdgpu_ps void @_amdgpu_ps_main(i32 inreg noundef %{{[^,]*}}, i32 inreg noundef %userdata1,
; SHADERTEST: [[Addr0:%[0-9]*]] = zext i32 %userdata1 to i64
; SHADERTEST: [[Addr1:%[0-9]*]] = or i64 %{{[0-9]*}}, [[Addr0]]
; SHADERTEST: [[Addr1:%[0-9]*]] = or {{(disjoint )?}}i64 %{{[0-9]*}}, [[Addr0]]
; SHADERTEST: [[Addr2:%[0-9]*]] = inttoptr i64 [[Addr1]] to ptr addrspace(4)
; SHADERTEST: [[Value:%[0-9]*]] = load <4 x float>, ptr addrspace(4) [[Addr2]], align 16
; SHADERTEST: [[Value3:%[.a-zA-Z0-9]+]] = extractelement <4 x float> [[Value]], i64 3
Expand Down
2 changes: 1 addition & 1 deletion llpc/test/shaderdb/general/TestWorkgroupIdOpt.comp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void main()
// CHECK-NEXT: [[TMP0:%.*]] = call i64 @llvm.amdgcn.s.getpc()
// CHECK-NEXT: [[TMP1:%.*]] = and i64 [[TMP0]], -4294967296
// CHECK-NEXT: [[TMP2:%.*]] = zext i32 [[USERDATA0]] to i64
// CHECK-NEXT: [[TMP3:%.*]] = or i64 [[TMP1]], [[TMP2]]
// CHECK-NEXT: [[TMP3:%.*]] = or {{(disjoint )?}}i64 [[TMP1]], [[TMP2]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test has auto-generated checks - presumably the optional disjoint will get changed if that's run?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, once llvm is updated and someone regenerates the test, these will be made permanent :)

// CHECK-NEXT: [[TMP4:%.*]] = inttoptr i64 [[TMP3]] to ptr addrspace(4)
// CHECK-NEXT: [[TMP5:%.*]] = load <4 x i32>, ptr addrspace(4) [[TMP4]], align 16
// CHECK-NEXT: call void @llvm.amdgcn.raw.buffer.store.i32(i32 [[WORKGROUPID1]], <4 x i32> [[TMP5]], i32 0, i32 0, i32 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ attribute[0].offset = 0
; SHADERTEST-NEXT: [[DOTI1:%.*]] = fptosi float [[TMP19]] to i32
; SHADERTEST-NEXT: [[TMP12:%.*]] = and i64 [[TMP11]], -4294967296
; SHADERTEST-NEXT: [[TMP13:%.*]] = zext i32 [[DESCTABLE0:%.*]] to i64
; SHADERTEST-NEXT: [[TMP14:%.*]] = or i64 [[TMP12]], [[TMP13]]
; SHADERTEST-NEXT: [[TMP14:%.*]] = or {{(disjoint )?}}i64 [[TMP12]], [[TMP13]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also auto-generated

; SHADERTEST-NEXT: [[TMP15:%.*]] = inttoptr i64 [[TMP14]] to ptr addrspace(4)
; SHADERTEST-NEXT: [[TMP20:%.*]] = load <8 x i32>, ptr addrspace(4) [[TMP15]], align 32, !invariant.load !10
; SHADERTEST-NEXT: [[TMP21:%.*]] = load <4 x i32>, ptr addrspace(4) [[TMP15]], align 16, !invariant.load !10
Expand All @@ -94,7 +94,7 @@ attribute[0].offset = 0
; SHADERTEST-NEXT: [[TMP23:%.*]] = call reassoc nnan nsz arcp contract afn <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float [[DOTI01]], float [[DOTI12]], <8 x i32> [[TMP20]], <4 x i32> [[TMP21]], i1 false, i32 0, i32 0)
; SHADERTEST-NEXT: [[TMP24:%.*]] = insertvalue { <4 x float> } poison, <4 x float> [[TMP23]], 0
; SHADERTEST-NEXT: [[TMP25:%.*]] = zext i32 [[COLOREXPADDR:%.*]] to i64
; SHADERTEST-NEXT: [[TMP26:%.*]] = or i64 [[TMP12]], [[TMP25]]
; SHADERTEST-NEXT: [[TMP26:%.*]] = or {{(disjoint )?}}i64 [[TMP12]], [[TMP25]]
; SHADERTEST-NEXT: [[TMP27:%.*]] = inttoptr i64 [[TMP26]] to ptr addrspace(4)
; SHADERTEST-NEXT: call amdgpu_gfx addrspace(4) void [[TMP27]]({ <4 x float> } [[TMP24]])
; SHADERTEST-NEXT: unreachable
Expand Down
Loading