1 ; RUN: llc --filetype=asm %s -o - | FileCheck %s
2 target triple = "dxil-unknown-shadermodel6.7-library"
4 define i64 @test(ptr %p) {
10 ; CHECK: define i64 @test(ptr %p) {
11 ; CHECK-NEXT: %1 = bitcast ptr %p to ptr
12 ; CHECK-NEXT: store i32 0, ptr %1, align 4
13 ; CHECK-NEXT: %2 = bitcast ptr %p to ptr
14 ; CHECK-NEXT: %3 = load i64, ptr %2, align 8
16 define i64 @testGEP(ptr %p) {
17 %ptr = getelementptr i32, ptr %p, i32 4
18 %val = load i64, ptr %p
22 ; CHECK: define i64 @testGEP(ptr %p) {
23 ; CHECK-NEXT: %1 = bitcast ptr %p to ptr
24 ; CHECK-NEXT: %ptr = getelementptr i32, ptr %1, i32 4
25 ; CHECK-NEXT: %2 = bitcast ptr %p to ptr
26 ; CHECK-NEXT: %3 = load i64, ptr %2, align 8