summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2015-07-14 17:25:20 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2015-07-14 17:25:20 +0000
commit984a3613b379de4d8a5d26b5d40ccf54f393c2aa (patch)
tree9c82e141116019d4439ab381270ed07b52324bf1 /llvm/test/CodeGen
parentfeabe2e21e2938dc147c921ff90796a54338c620 (diff)
downloadbcm5719-llvm-984a3613b379de4d8a5d26b5d40ccf54f393c2aa.tar.gz
bcm5719-llvm-984a3613b379de4d8a5d26b5d40ccf54f393c2aa.zip
Add missing builtins to the PPC back end for ABI compliance (vol. 4)
This patch corresponds to review: http://reviews.llvm.org/D11183 Back end portion of the fourth round of additions to altivec.h. llvm-svn: 242167
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/PowerPC/builtins-ppc-elf2-abi.ll30
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/builtins-ppc-elf2-abi.ll b/llvm/test/CodeGen/PowerPC/builtins-ppc-elf2-abi.ll
index 16dc2ccb111..6013a412924 100644
--- a/llvm/test/CodeGen/PowerPC/builtins-ppc-elf2-abi.ll
+++ b/llvm/test/CodeGen/PowerPC/builtins-ppc-elf2-abi.ll
@@ -134,6 +134,36 @@ entry:
; CHECK: xvcmpgtsp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
+; Function Attrs: nounwind
+define <4 x float> @emit_xvresp(<4 x float> %a) {
+entry:
+ %a.addr = alloca <4 x float>, align 16
+ store <4 x float> %a, <4 x float>* %a.addr, align 16
+ %0 = load <4 x float>, <4 x float>* %a.addr, align 16
+ %1 = call <4 x float> @llvm.ppc.vsx.xvresp(<4 x float> %0)
+ ret <4 x float> %1
+; CHECK-LABEL: @emit_xvresp
+; CHECK: xvresp {{[0-9]+}}, {{[0-9]+}}
+}
+
+; Function Attrs: nounwind
+define <2 x double> @emit_xvredp(<2 x double> %a) {
+entry:
+ %a.addr = alloca <2 x double>, align 16
+ store <2 x double> %a, <2 x double>* %a.addr, align 16
+ %0 = load <2 x double>, <2 x double>* %a.addr, align 16
+ %1 = call <2 x double> @llvm.ppc.vsx.xvredp(<2 x double> %0)
+ ret <2 x double> %1
+; CHECK-LABEL: @emit_xvredp
+; CHECK: xvredp {{[0-9]+}}, {{[0-9]+}}
+}
+
+; Function Attrs: nounwind readnone
+declare <4 x float> @llvm.ppc.vsx.xvresp(<4 x float>)
+
+; Function Attrs: nounwind readnone
+declare <2 x double> @llvm.ppc.vsx.xvredp(<2 x double>)
+
; Function Attrs: nounwind readnone
declare <2 x double> @llvm.ceil.v2f64(<2 x double>)
OpenPOWER on IntegriCloud