brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 612f7b7 Raw
36 lines · plain
1# NOTE: This file is Generic MIR translation of llvm/test/Analysis/UniformityAnalysis/AMDGPU/addrspacecast.ll test file2# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -run-pass=print-machine-uniformity -filetype=null %s 2>&1 | FileCheck %s --check-prefix=UNI3# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 -run-pass=print-machine-uniformity -filetype=null %s 2>&1 | FileCheck %s --check-prefix=DIV4 5# UNI: ALL VALUES UNIFORM6# DIV: DIVERGENT: %3: %3:_(p0) = G_ADDRSPACE_CAST %2:_(p5)7# DIV: DIVERGENT: %4: %4:_(p0) = G_INTRINSIC intrinsic(@llvm.amdgcn.addrspacecast.nonnull), %2:_(p5)8 9--- |10  define void @foo() {11    %alloca = alloca i32, align 4, addrspace(5)12    %cast = addrspacecast ptr addrspace(5) %alloca to ptr13    store i32 1, ptr %cast, align 414    %cast.1 = call ptr @llvm.amdgcn.addrspacecast.nonnull.p0.p5(ptr addrspace(5) %alloca)15    store i32 2, ptr %cast.1, align 416    ret void17  }18...19---20name:            foo21stack:22  - { id: 0, name: alloca, type: default, offset: 0, size: 4, alignment: 4,23      stack-id: default, callee-saved-register: '', callee-saved-restored: true,24      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }25body:             |26  bb.1 (%ir-block.0):27    %10:_(s32) = G_CONSTANT i32 128    %12:_(s32) = G_CONSTANT i32 229    %8:_(p5) = G_FRAME_INDEX %stack.0.alloca30    %9:_(p0) = G_ADDRSPACE_CAST %8(p5)31    G_STORE %10(s32), %9(p0) :: (store (s32) into %ir.cast)32    %11:_(p0) = G_INTRINSIC intrinsic(@llvm.amdgcn.addrspacecast.nonnull), %8(p5)33    G_STORE %12(s32), %11(p0) :: (store (s32) into %ir.cast.1)34    SI_RETURN35...36