summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/fast-isel-i64offset.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /test/CodeGen/PowerPC/fast-isel-i64offset.ll
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
Diffstat (limited to 'test/CodeGen/PowerPC/fast-isel-i64offset.ll')
-rw-r--r--test/CodeGen/PowerPC/fast-isel-i64offset.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/fast-isel-i64offset.ll b/test/CodeGen/PowerPC/fast-isel-i64offset.ll
new file mode 100644
index 0000000000000..00278d68f6381
--- /dev/null
+++ b/test/CodeGen/PowerPC/fast-isel-i64offset.ll
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple powerpc64-unknown-linux-gnu -fast-isel -O0 < %s | FileCheck %s
+
+; Verify that pointer offsets larger than 32 bits work correctly.
+
+define void @test(i32* %array) {
+; CHECK-LABEL: test:
+; CHECK-NOT: li {{[0-9]+}}, -8
+ %element = getelementptr i32, i32* %array, i64 2147483646
+ store i32 1234, i32* %element
+ ret void
+}
+