summaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64/arm64-big-imm-offsets.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/AArch64/arm64-big-imm-offsets.ll')
-rw-r--r--test/CodeGen/AArch64/arm64-big-imm-offsets.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/arm64-big-imm-offsets.ll b/test/CodeGen/AArch64/arm64-big-imm-offsets.ll
new file mode 100644
index 0000000000..a56df07a49
--- /dev/null
+++ b/test/CodeGen/AArch64/arm64-big-imm-offsets.ll
@@ -0,0 +1,14 @@
+; RUN: llc -march=arm64 < %s
+
+
+; Make sure large offsets aren't mistaken for valid immediate offsets.
+; <rdar://problem/13190511>
+define void @f(i32* nocapture %p) {
+entry:
+ %a = ptrtoint i32* %p to i64
+ %ao = add i64 %a, 25769803792
+ %b = inttoptr i64 %ao to i32*
+ store volatile i32 0, i32* %b, align 4
+ store volatile i32 0, i32* %b, align 4
+ ret void
+}