[llvm] e25ddf9 - [NFC][AMDGPU] Auto generate check lines for `llvm/test/CodeGen/AMDGPU/inline-attr.ll`

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Thu May 1 10:52:32 PDT 2025


Author: Shilei Tian
Date: 2025-05-01T13:52:27-04:00
New Revision: e25ddf908178d6ad4a2557b2800b4ea6248eb632

URL: https://github.com/llvm/llvm-project/commit/e25ddf908178d6ad4a2557b2800b4ea6248eb632
DIFF: https://github.com/llvm/llvm-project/commit/e25ddf908178d6ad4a2557b2800b4ea6248eb632.diff

LOG: [NFC][AMDGPU] Auto generate check lines for `llvm/test/CodeGen/AMDGPU/inline-attr.ll`

Added: 
    

Modified: 
    llvm/test/CodeGen/AMDGPU/inline-attr.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AMDGPU/inline-attr.ll b/llvm/test/CodeGen/AMDGPU/inline-attr.ll
index 15f24b17219b7..4ae0ba065adfc 100644
--- a/llvm/test/CodeGen/AMDGPU/inline-attr.ll
+++ b/llvm/test/CodeGen/AMDGPU/inline-attr.ll
@@ -1,23 +1,18 @@
-; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -enable-unsafe-fp-math %s  | FileCheck -check-prefix=GCN -check-prefix=UNSAFE %s
-; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -enable-no-nans-fp-math %s | FileCheck -check-prefix=GCN -check-prefix=NONANS %s
-; RUN: opt -mtriple=amdgcn--amdhsa -S -O3 -enable-no-infs-fp-math %s | FileCheck -check-prefix=GCN -check-prefix=NOINFS %s
-
-; GCN: define float @foo(float %x) local_unnamed_addr #0 {
-; GCN: define amdgpu_kernel void @caller(ptr addrspace(1) captures(none) %p) local_unnamed_addr #1 {
-; GCN: %mul.i = fmul float %load, 1.500000e+01
-
-; UNSAFE: attributes #0 = { nounwind "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
-; UNSAFE: attributes #1 = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
-
-; NOINFS: attributes #0 = { nounwind "no-infs-fp-math"="true" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
-; NOINFS: attributes #1 = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="true" "no-nans-fp-math"="false" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
-
-; NONANS: attributes #0 = { nounwind "no-nans-fp-math"="true" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
-; NONANS: attributes #1 = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="true" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5
+; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-unsafe-fp-math %s  | FileCheck --check-prefixes=GCN,UNSAFE %s
+; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-no-nans-fp-math %s | FileCheck --check-prefixes=GCN,NONANS %s
+; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -O3 -enable-no-infs-fp-math %s | FileCheck --check-prefixes=GCN,NOINFS %s
 
 declare void @extern() #0
 
 define float @foo(float %x) #0 {
+; GCN-LABEL: define float @foo(
+; GCN-SAME: float [[X:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
+; GCN-NEXT:  [[ENTRY:.*:]]
+; GCN-NEXT:    tail call void @extern()
+; GCN-NEXT:    [[MUL:%.*]] = fmul float [[X]], 1.500000e+01
+; GCN-NEXT:    ret float [[MUL]]
+;
 entry:
   call void @extern()
   %mul = fmul float %x, 1.500000e+01
@@ -25,6 +20,15 @@ entry:
 }
 
 define amdgpu_kernel void @caller(ptr addrspace(1) %p) #1 {
+; GCN-LABEL: define amdgpu_kernel void @caller(
+; GCN-SAME: ptr addrspace(1) captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
+; GCN-NEXT:  [[ENTRY:.*:]]
+; GCN-NEXT:    [[LOAD:%.*]] = load float, ptr addrspace(1) [[P]], align 4, !amdgpu.noclobber [[META0:![0-9]+]]
+; GCN-NEXT:    tail call void @extern()
+; GCN-NEXT:    [[MUL_I:%.*]] = fmul float [[LOAD]], 1.500000e+01
+; GCN-NEXT:    store float [[MUL_I]], ptr addrspace(1) [[P]], align 4
+; GCN-NEXT:    ret void
+;
 entry:
   %load = load float, ptr addrspace(1) %p, align 4
   %call = call fast float @foo(float %load)
@@ -34,3 +38,24 @@ entry:
 
 attributes #0 = { nounwind "uniform-work-group-size"="false" "unsafe-fp-math"="true"}
 attributes #1 = { nounwind "less-precise-fpmad"="true" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "unsafe-fp-math"="true" }
+
+;.
+; UNSAFE: attributes #[[ATTR0]] = { nounwind "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+; UNSAFE: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+;.
+; NONANS: attributes #[[ATTR0]] = { nounwind "no-nans-fp-math"="true" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+; NONANS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="true" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+;.
+; NOINFS: attributes #[[ATTR0]] = { nounwind "no-infs-fp-math"="true" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+; NOINFS: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-infs-fp-math"="true" "no-nans-fp-math"="false" "uniform-work-group-size"="false" "unsafe-fp-math"="true" }
+;.
+; UNSAFE: [[META0]] = !{}
+;.
+; NONANS: [[META0]] = !{}
+;.
+; NOINFS: [[META0]] = !{}
+;.
+;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
+; NOINFS: {{.*}}
+; NONANS: {{.*}}
+; UNSAFE: {{.*}}


        


More information about the llvm-commits mailing list