brintos

brintos / llvm-project-archived public Read only

0
0
Text · 745 B · 965d96a Raw
24 lines · plain
1; RUN: opt -mtriple=arm64-darwin-unknown -S -passes=consthoist < %s | FileCheck %s2 3%T = type { i32, i32, i32, i32 }4 5define i32 @test1() nounwind {6; CHECK-LABEL: test17; CHECK: %const = bitcast i64 68141056 to i648; CHECK: %1 = inttoptr i64 %const to ptr9; CHECK: %o1 = getelementptr %T, ptr %1, i32 0, i32 110; CHECK: %o2 = getelementptr %T, ptr %1, i32 0, i32 211; CHECK: %o3 = getelementptr %T, ptr %1, i32 0, i32 312  %at = inttoptr i64 68141056 to ptr13  %o1 = getelementptr %T, ptr %at, i32 0, i32 114  %t1 = load i32, ptr %o115  %o2 = getelementptr %T, ptr %at, i32 0, i32 216  %t2 = load i32, ptr %o217  %a1 = add i32 %t1, %t218  %o3 = getelementptr %T, ptr %at, i32 0, i32 319  %t3 = load i32, ptr %o320  %a2 = add i32 %a1, %t321  ret i32 %a222}23 24