brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · d182d35 Raw
84 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn -mcpu=gfx1030 -stop-after=amdgpu-remove-incompatible-functions\3; RUN:   -pass-remarks=amdgpu-remove-incompatible-functions %s -o - 2>%t | FileCheck -check-prefixes=COMPATIBLE,REALTIME,MEMTIME %s4; RUN: FileCheck -allow-empty --check-prefixes=WARN-REALTIME,WARN-MEMTIME %s < %t5; RUN: llc -mtriple=amdgcn -mcpu=gfx1030 < %s6 7; RUN: llc -enable-new-pm -mtriple=amdgcn -mcpu=gfx1030 -stop-after=amdgpu-remove-incompatible-functions\8; RUN:   -pass-remarks=amdgpu-remove-incompatible-functions %s -o - 2>%t | FileCheck -check-prefixes=COMPATIBLE,REALTIME,MEMTIME %s9; RUN: FileCheck -allow-empty --check-prefixes=WARN-REALTIME,WARN-MEMTIME %s < %t10 11; RUN: llc -mtriple=amdgcn -mcpu=gfx1102 -stop-after=amdgpu-remove-incompatible-functions\12; RUN:   -pass-remarks=amdgpu-remove-incompatible-functions %s -o - 2>%t | FileCheck -check-prefixes=INCOMPATIBLE,NOREALTIME,NOMEMTIME %s13; RUN: FileCheck --check-prefixes=WARN-NOREALTIME,WARN-NOMEMTIME %s < %t14; RUN: llc -mtriple=amdgcn -mcpu=gfx1102 < %s15 16; RUN: llc -enable-new-pm -mtriple=amdgcn -mcpu=gfx1102 -stop-after=amdgpu-remove-incompatible-functions\17; RUN:   -pass-remarks=amdgpu-remove-incompatible-functions %s -o - 2>%t | FileCheck -check-prefixes=INCOMPATIBLE,NOREALTIME,NOMEMTIME %s18; RUN: FileCheck --check-prefixes=WARN-NOREALTIME,WARN-NOMEMTIME %s < %t19 20; Note: This test checks the IR, but also has a run line to codegen the file just to check we21; do not crash when trying to select those functions.22 23; WARN-REALTIME-NOT: removing function 'needs_s_memrealtime':24; WARN-MEMTIME-NOT:  removing function 'needs_s_memtime':25; WARN-NOREALTIME:   removing function 'needs_s_memrealtime': +s-memrealtime is not supported on the current target26; WARN-NOMEMTIME:    removing function 'needs_s_memtime': +s-memtime-inst is not supported on the current target27 28; COMPATIBLE:       @GVRefs  {{.*}} [ptr @needs_s_memrealtime, ptr @needs_s_memtime]29; INCOMPATIBLE:     @GVRefs {{.*}} zeroinitializer30@GVRefs = internal global [2 x ptr] [31  ptr @needs_s_memrealtime,32  ptr @needs_s_memtime33]34 35; REALTIME:    @ConstantExpr0 = internal global i64 ptrtoint (ptr @needs_s_memrealtime to i64)36; NOREALTIME:  @ConstantExpr0 = internal global i64 037@ConstantExpr0 = internal global i64 ptrtoint (ptr @needs_s_memrealtime to i64)38 39; MEMTIME:     @ConstantExpr1 = internal global i64 ptrtoint (ptr @needs_s_memtime to i64)40; NOMEMTIME:   @ConstantExpr1 = internal global i64 041@ConstantExpr1 = internal global i64 ptrtoint (ptr @needs_s_memtime to i64)42 43; REALTIME:         define i64 @needs_s_memrealtime44; NOREALTIME-NOT:   define i64 @needs_s_memrealtime45define i64 @needs_s_memrealtime() #0 {46  %t = tail call i64 @llvm.amdgcn.s.memrealtime()47  ret i64 %t48}49 50; IR: define void @s_memrealtime_caller(51define i64 @s_memrealtime_caller() {52  %t = call i64 @needs_s_memrealtime()53  ; IR: ret i64 %t54  ret i64 %t55}56 57; MEMTIME:         define i64 @needs_s_memtime58; NOMEMTIME-NOT:   define i64 @needs_s_memtime59define i64 @needs_s_memtime() #1 {60  %t = tail call i64 @llvm.amdgcn.s.memtime()61  ret i64 %t62}63 64; IR: define void @s_memtime_caller(65define i64 @s_memtime_caller() {66  %t = call i64 @needs_s_memtime()67  ; IR: ret i64 %t68  ret i64 %t69}70 71 72declare i64 @llvm.amdgcn.s.memrealtime()73declare i64 @llvm.amdgcn.s.memtime()74 75attributes #0 = { "target-features"="+s-memrealtime"}76attributes #1 = { "target-features"="+s-memtime-inst"}77;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:78; COMPATIBLE: {{.*}}79; INCOMPATIBLE: {{.*}}80; MEMTIME: {{.*}}81; NOMEMTIME: {{.*}}82; NOREALTIME: {{.*}}83; REALTIME: {{.*}}84