-; RUN: llc < %s -mtriple=x86_64-darwin -mcpu=corei7 | grep movabsq | count 2
+; RUN: llc < %s -mtriple=x86_64-darwin -mcpu=corei7 | grep movabsq | count 3
define i64 @constant_hoisting(i64 %o0, i64 %o1, i64 %o2, i64 %o3, i64 %o4, i64 %o5) {
entry:
ret void
}
+
+define void @constant_expressions2() {
+entry:
+ %0 = load i64* inttoptr (i64 51250129900 to i64*)
+ %1 = load i64* inttoptr (i64 51250129908 to i64*)
+ %2 = load i64* inttoptr (i64 51250129916 to i64*)
+ %3 = load i64* inttoptr (i64 51250129924 to i64*)
+ %4 = add i64 %0, %1
+ %5 = add i64 %2, %3
+ %6 = add i64 %4, %5
+ store i64 %6, i64* inttoptr (i64 51250129900 to i64*)
+ ret void
+}
+