summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/negative-subscript.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/negative-subscript.ll')
-rw-r--r--test/CodeGen/X86/negative-subscript.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/negative-subscript.ll b/test/CodeGen/X86/negative-subscript.ll
new file mode 100644
index 000000000000..f2bd315bd867
--- /dev/null
+++ b/test/CodeGen/X86/negative-subscript.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -march=x86
+; rdar://6559995
+
+@a = external global [255 x i8*], align 32
+
+define i32 @main() nounwind {
+entry:
+ store i8* bitcast (i8** getelementptr ([255 x i8*]* @a, i32 0, i32 -2147483624) to i8*), i8** getelementptr ([255 x i8*]* @a, i32 0, i32 16), align 32
+ ret i32 0
+}