summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2016-01-29 07:20:01 +0000
committerEric Christopher <echristo@gmail.com>2016-01-29 07:20:01 +0000
commit5a2429e239483daada19b09581dc095bfff8dec3 (patch)
tree50a6acaa275b9fad09cdc048666b6cdbf90bf86a /llvm/test/CodeGen/PowerPC/fast-isel-ret.ll
parent80ba58a15c28614c472b5ab561b5cf77af3173b2 (diff)
downloadbcm5719-llvm-5a2429e239483daada19b09581dc095bfff8dec3.tar.gz
bcm5719-llvm-5a2429e239483daada19b09581dc095bfff8dec3.zip
Since LI/LIS sign extend the constant passed into the instruction we should
check that the sign extended constant fits into 16-bits if we want a zero extended value, otherwise go ahead and put it together piecemeal. Fixes PR26356. llvm-svn: 259177
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/fast-isel-ret.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/fast-isel-ret.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll b/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll
index e05ef7d9ab8..0adb5a93510 100644
--- a/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll
+++ b/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll
@@ -186,3 +186,12 @@ entry:
; ELF64: blr
ret i32 -1
}
+
+define zeroext i16 @ret20() nounwind {
+entry:
+; ELF64-LABEL: ret20
+; ELF64: lis{{.*}}0
+; ELF64: ori{{.*}}32768
+; ELF64: blr
+ ret i16 32768
+}
OpenPOWER on IntegriCloud