1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s 3; rdar://6707985 4 5 %XXOO = type { %"struct.XXC::XXCC", ptr, %"struct.XXC::XXOO::$_71" } 6 %XXValue = type opaque 7 %"struct.XXC::ArrayStorage" = type { i32, i32, i32, ptr, ptr, [1 x ptr] } 8 %"struct.XXC::XXArray" = type { %XXOO, i32, ptr } 9 %"struct.XXC::XXCC" = type { ptr, ptr } 10 %"struct.XXC::XXOO::$_71" = type { [2 x ptr] } 11 12define internal fastcc ptr @t(ptr %out, ptr %tmp9) nounwind { 13; CHECK-LABEL: t: 14; CHECK: ## %bb.0: ## %prologue 15; CHECK-NEXT: movq 22222222, %rax 16; CHECK-NEXT: movq %rax, (%rdi) 17; CHECK-NEXT: movl %eax, %eax 18; CHECK-NEXT: movq 32(%rsi,%rax,8), %rax 19; CHECK-NEXT: retq 20prologue: 21 %array = load ptr, ptr inttoptr (i64 11111111 to ptr) ; <ptr> [#uses=0] 22 %index = load ptr, ptr inttoptr (i64 22222222 to ptr) ; <ptr> [#uses=1] 23 %tmp = ptrtoint ptr %index to i64 ; <i64> [#uses=2] 24 store i64 %tmp, ptr %out 25 %tmp6 = trunc i64 %tmp to i32 ; <i32> [#uses=1] 26 br label %bb5 27 28bb5: ; preds = %prologue 29 %tmp10 = zext i32 %tmp6 to i64 ; <i64> [#uses=1] 30 %tmp11 = getelementptr %"struct.XXC::ArrayStorage", ptr %tmp9, i64 0, i32 5, i64 %tmp10 ; <ptr> [#uses=1] 31 %tmp12 = load ptr, ptr %tmp11, align 8 ; <ptr> [#uses=1] 32 ret ptr %tmp12 33} 34