summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-18 01:11:46 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-18 01:11:46 +0000
commit0e60d55519549472ebf099f632c1ca823643ef99 (patch)
tree5f2aa55f6dff2176ee1d593e188179ed92748b27 /llvm
parent776311e00085c06190d1038c9085dfd74901e942 (diff)
downloadbcm5719-llvm-0e60d55519549472ebf099f632c1ca823643ef99.tar.gz
bcm5719-llvm-0e60d55519549472ebf099f632c1ca823643ef99.zip
Add a couple little tests for SExt/ZExt of constants of a sign that doesn't
match. llvm-svn: 32647
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/Feature/newcasts.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Feature/newcasts.ll b/llvm/test/Feature/newcasts.ll
index 6b297961aa7..00919d180dd 100644
--- a/llvm/test/Feature/newcasts.ll
+++ b/llvm/test/Feature/newcasts.ll
@@ -19,3 +19,10 @@ void "NewCasts" (short %x) {
}
+ushort "ZExtConst" () {
+ ret ushort trunc ( uint zext ( short 42 to uint) to ushort )
+}
+
+short "SExtConst" () {
+ ret short trunc (int sext (ushort 42 to int) to short )
+}
OpenPOWER on IntegriCloud