[llvm] [Attributor][AMDGPU] Enable AAIndirectCallInfo for AMDAttributorPass (PR #100952)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 08:15:48 PDT 2024


================
@@ -231,7 +231,19 @@ define amdgpu_kernel void @indirect_calls_none_agpr(i1 %cond) {
 ; CHECK-LABEL: define amdgpu_kernel void @indirect_calls_none_agpr(
 ; CHECK-SAME: i1 [[COND:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:    [[FPTR:%.*]] = select i1 [[COND]], ptr @empty, ptr @also_empty
-; CHECK-NEXT:    call void [[FPTR]]()
+; CHECK-NEXT:    [[TMP1:%.*]] = icmp eq ptr [[FPTR]], @also_empty
+; CHECK-NEXT:    br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP3:%.*]]
+; CHECK:       2:
+; CHECK-NEXT:    call void @also_empty()
+; CHECK-NEXT:    br label [[TMP6:%.*]]
+; CHECK:       3:
+; CHECK-NEXT:    br i1 true, label [[TMP4:%.*]], label [[TMP5:%.*]]
+; CHECK:       4:
+; CHECK-NEXT:    call void @empty()
+; CHECK-NEXT:    br label [[TMP6]]
+; CHECK:       5:
+; CHECK-NEXT:    unreachable
+; CHECK:       6:
----------------
shiltian wrote:

I understand your point, but AAs don't run in isolation. Here we enable a new AA so some tests need to be updated. I'd argue this doesn't defect the purpose of the test. Also, in #100954 this is reverted.

This patch primes #100953 to help to demonstrate how the changes in #100953 works; otherwise I'd just enable that in #100954.

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


More information about the llvm-commits mailing list