diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-09 20:54:38 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-09 20:54:38 +0000 |
commit | 5c23d3c2cf096d7f4d50e44baf9423261d3646bd (patch) | |
tree | b149ba2e249bee73ad4b3e82327bc1e6a2329f80 /test | |
parent | d6c465495192651072906bf2745a70d214bd0d77 (diff) | |
download | external_llvm-5c23d3c2cf096d7f4d50e44baf9423261d3646bd.zip external_llvm-5c23d3c2cf096d7f4d50e44baf9423261d3646bd.tar.gz external_llvm-5c23d3c2cf096d7f4d50e44baf9423261d3646bd.tar.bz2 |
Make sure constant subscript is truncated to ptr size if it may not fit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/negative-subscript.ll | 10 |
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 0000000..f2bd315 --- /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 +} |