summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/select.ll
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2015-08-31 18:00:30 +0000
committerFilipe Cabecinhas <me@filcab.net>2015-08-31 18:00:30 +0000
commit984fefdd81f310baa4d0a2562e71adeb8cd80bce (patch)
treea43fda2d80fde9365f579298c14750e0e001e4d1 /llvm/test/Bitcode/select.ll
parentb9c2c71d09ee49e43618901cc9803fdc637c15c9 (diff)
downloadbcm5719-llvm-984fefdd81f310baa4d0a2562e71adeb8cd80bce.tar.gz
bcm5719-llvm-984fefdd81f310baa4d0a2562e71adeb8cd80bce.zip
[BitcodeReader] Ensure we can read constant vector selects with an i1 condition
Summary: Constant vectors weren't allowed to have an i1 condition in the BitcodeReader. Make sure we have the same restrictions that are documented, not more. Reviewers: nlewycky, rafael, kschimpf Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12440 llvm-svn: 246459
Diffstat (limited to 'llvm/test/Bitcode/select.ll')
-rw-r--r--llvm/test/Bitcode/select.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/select.ll b/llvm/test/Bitcode/select.ll
index 3ad06796dcc..666d2960fb5 100644
--- a/llvm/test/Bitcode/select.ll
+++ b/llvm/test/Bitcode/select.ll
@@ -8,3 +8,11 @@ define <2 x i32> @main() {
; CHECK: define <2 x i32> @main() {
; CHECK: ret <2 x i32> <i32 0, i32 undef>
; CHECK: }
+
+define <2 x float> @f() {
+ ret <2 x float> select (i1 ptrtoint (<2 x float> ()* @f to i1), <2 x float> <float 1.000000e+00, float 0.000000e+00>, <2 x float> zeroinitializer)
+}
+
+; CHECK: define <2 x float> @f() {
+; CHECK: ret <2 x float> select (i1 ptrtoint (<2 x float> ()* @f to i1), <2 x float> <float 1.000000e+00, float 0.000000e+00>, <2 x float> zeroinitializer)
+; CHECK: }
OpenPOWER on IntegriCloud