summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-19 20:35:26 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-19 20:35:26 +0000
commit732f0a838ecce8b206b6a21a385122cbc32ab09f (patch)
treebd81fcde176f1ad66ef0122a50049639eafa79af
parent2946e07557917b2a353783c4e8eee01092f1bd20 (diff)
downloadbcm5719-llvm-732f0a838ecce8b206b6a21a385122cbc32ab09f.tar.gz
bcm5719-llvm-732f0a838ecce8b206b6a21a385122cbc32ab09f.zip
Test case noticed by Sheng that fails because negative values that are
greater than 64-bits don't have the sign bits extended on construction of the APInt. llvm-svn: 35178
-rw-r--r--llvm/test/Assembler/2007-03-19-NegValue.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Assembler/2007-03-19-NegValue.ll b/llvm/test/Assembler/2007-03-19-NegValue.ll
new file mode 100644
index 00000000000..364bec1c3ec
--- /dev/null
+++ b/llvm/test/Assembler/2007-03-19-NegValue.ll
@@ -0,0 +1,7 @@
+; Test whether negative values > 64 bits retain their negativeness.
+; RUN: llvm-as < %s | llvm-dis | grep 'add i65.*, -1'
+
+define i65 @testConsts(i65 %N) {
+ %a = add i65 %N, -1
+ ret i65 %a
+}
OpenPOWER on IntegriCloud