summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-03-09 20:42:30 +0000
committerSanjay Patel <spatel@rotateright.com>2017-03-09 20:42:30 +0000
commit7e56366204287a513420a2633daa1f92b009f4bf (patch)
tree6b31c15a01faeef7b206323e080418aabf7067d7 /llvm/test
parentefe949cc67607361525c4b3b2e211677b4805caf (diff)
downloadbcm5719-llvm-7e56366204287a513420a2633daa1f92b009f4bf.tar.gz
bcm5719-llvm-7e56366204287a513420a2633daa1f92b009f4bf.zip
[ConstantFold] vector div/rem with any zero element in divisor is undef
Follow-up for: https://reviews.llvm.org/D30665 https://reviews.llvm.org/rL297390 llvm-svn: 297409
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstSimplify/div.ll4
-rw-r--r--llvm/test/Transforms/InstSimplify/rem.ll4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/InstSimplify/div.ll b/llvm/test/Transforms/InstSimplify/div.ll
index 6412bdfffe3..560d3eea933 100644
--- a/llvm/test/Transforms/InstSimplify/div.ll
+++ b/llvm/test/Transforms/InstSimplify/div.ll
@@ -4,7 +4,7 @@
define <2 x i8> @sdiv_zero_elt_vec_constfold(<2 x i8> %x) {
; CHECK-LABEL: @sdiv_zero_elt_vec_constfold(
-; CHECK-NEXT: ret <2 x i8> <i8 undef, i8 0>
+; CHECK-NEXT: ret <2 x i8> undef
;
%div = sdiv <2 x i8> <i8 1, i8 2>, <i8 0, i8 -42>
ret <2 x i8> %div
@@ -12,7 +12,7 @@ define <2 x i8> @sdiv_zero_elt_vec_constfold(<2 x i8> %x) {
define <2 x i8> @udiv_zero_elt_vec_constfold(<2 x i8> %x) {
; CHECK-LABEL: @udiv_zero_elt_vec_constfold(
-; CHECK-NEXT: ret <2 x i8> <i8 0, i8 undef>
+; CHECK-NEXT: ret <2 x i8> undef
;
%div = udiv <2 x i8> <i8 1, i8 2>, <i8 42, i8 0>
ret <2 x i8> %div
diff --git a/llvm/test/Transforms/InstSimplify/rem.ll b/llvm/test/Transforms/InstSimplify/rem.ll
index 90a0e658235..c60b728cad2 100644
--- a/llvm/test/Transforms/InstSimplify/rem.ll
+++ b/llvm/test/Transforms/InstSimplify/rem.ll
@@ -5,7 +5,7 @@
define <2 x i8> @srem_zero_elt_vec_constfold(<2 x i8> %x) {
; CHECK-LABEL: @srem_zero_elt_vec_constfold(
-; CHECK-NEXT: ret <2 x i8> <i8 undef, i8 2>
+; CHECK-NEXT: ret <2 x i8> undef
;
%rem = srem <2 x i8> <i8 1, i8 2>, <i8 0, i8 -42>
ret <2 x i8> %rem
@@ -13,7 +13,7 @@ define <2 x i8> @srem_zero_elt_vec_constfold(<2 x i8> %x) {
define <2 x i8> @urem_zero_elt_vec_constfold(<2 x i8> %x) {
; CHECK-LABEL: @urem_zero_elt_vec_constfold(
-; CHECK-NEXT: ret <2 x i8> <i8 1, i8 undef>
+; CHECK-NEXT: ret <2 x i8> undef
;
%rem = urem <2 x i8> <i8 1, i8 2>, <i8 42, i8 0>
ret <2 x i8> %rem
OpenPOWER on IntegriCloud