brintos

brintos / llvm-project-archived public Read only

0
0
Text · 742 B · a26434b Raw
24 lines · plain
1; RUN: llc < %s -O0 -debug-only=isel -o /dev/null 2>&1 | FileCheck %s2 3; REQUIRES: asserts4 5target triple = "nvptx64-nvidia-cuda"6 7;; Selection DAG CSE is hard to test since we run CSE/GVN on the IR before and8;; after selection DAG ISel so most cases will be handled by one of these.9define void @foo(ptr %p) {10; CHECK-LABEL: Initial selection DAG11;12; CHECK:  [[ASC:t[0-9]+]]{{.*}} = addrspacecast13; CHECK:                          store{{.*}} [[ASC]]14; CHECK:                          store{{.*}} [[ASC]]15;16; CHECK-LABEL: Optimized lowered selection17;18   %a1 = addrspacecast ptr %p to ptr addrspace(5)19   %a2 = addrspacecast ptr %p to ptr addrspace(5)20   store i32 0, ptr addrspace(5) %a121   store i32 0, ptr addrspace(5) %a222   ret void23}24