summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-09-11 20:38:31 +0000
committerSanjay Patel <spatel@rotateright.com>2017-09-11 20:38:31 +0000
commitbb1b1c97fa6097263bda0fce4b25ebedd414ceff (patch)
tree851be7701e6f81ef3f5772e215a8cf0df0fdabcc
parentbf0d49c437813c4c0cfe14bf867933cfd5ed301e (diff)
downloadbcm5719-llvm-bb1b1c97fa6097263bda0fce4b25ebedd414ceff.tar.gz
bcm5719-llvm-bb1b1c97fa6097263bda0fce4b25ebedd414ceff.zip
[InstSimplify] fix some test names; NFC
Too much division...the quotient is the answer. llvm-svn: 312943
-rw-r--r--llvm/test/Transforms/InstSimplify/div.ll24
-rw-r--r--llvm/test/Transforms/InstSimplify/rem.ll24
-rw-r--r--llvm/test/Transforms/InstSimplify/signed-div-rem.ll64
3 files changed, 56 insertions, 56 deletions
diff --git a/llvm/test/Transforms/InstSimplify/div.ll b/llvm/test/Transforms/InstSimplify/div.ll
index be17746c24f..a1cc8572724 100644
--- a/llvm/test/Transforms/InstSimplify/div.ll
+++ b/llvm/test/Transforms/InstSimplify/div.ll
@@ -54,8 +54,8 @@ define <2 x i1> @udiv_bool_vec(<2 x i1> %x, <2 x i1> %y) {
ret <2 x i1> %div
}
-define i32 @udiv_quotient_known_smaller_than_constant_denom(i32 %x) {
-; CHECK-LABEL: @udiv_quotient_known_smaller_than_constant_denom(
+define i32 @udiv_dividend_known_smaller_than_constant_divisor(i32 %x) {
+; CHECK-LABEL: @udiv_dividend_known_smaller_than_constant_divisor(
; CHECK-NEXT: ret i32 0
;
%and = and i32 %x, 250
@@ -63,8 +63,8 @@ define i32 @udiv_quotient_known_smaller_than_constant_denom(i32 %x) {
ret i32 %div
}
-define i32 @not_udiv_quotient_known_smaller_than_constant_denom(i32 %x) {
-; CHECK-LABEL: @not_udiv_quotient_known_smaller_than_constant_denom(
+define i32 @not_udiv_dividend_known_smaller_than_constant_divisor(i32 %x) {
+; CHECK-LABEL: @not_udiv_dividend_known_smaller_than_constant_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 251
; CHECK-NEXT: [[DIV:%.*]] = udiv i32 [[AND]], 251
; CHECK-NEXT: ret i32 [[DIV]]
@@ -74,8 +74,8 @@ define i32 @not_udiv_quotient_known_smaller_than_constant_denom(i32 %x) {
ret i32 %div
}
-define i32 @udiv_constant_quotient_known_smaller_than_denom(i32 %x) {
-; CHECK-LABEL: @udiv_constant_quotient_known_smaller_than_denom(
+define i32 @udiv_constant_dividend_known_smaller_than_divisor(i32 %x) {
+; CHECK-LABEL: @udiv_constant_dividend_known_smaller_than_divisor(
; CHECK-NEXT: ret i32 0
;
%or = or i32 %x, 251
@@ -83,8 +83,8 @@ define i32 @udiv_constant_quotient_known_smaller_than_denom(i32 %x) {
ret i32 %div
}
-define i32 @not_udiv_constant_quotient_known_smaller_than_denom(i32 %x) {
-; CHECK-LABEL: @not_udiv_constant_quotient_known_smaller_than_denom(
+define i32 @not_udiv_constant_dividend_known_smaller_than_divisor(i32 %x) {
+; CHECK-LABEL: @not_udiv_constant_dividend_known_smaller_than_divisor(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, 251
; CHECK-NEXT: [[DIV:%.*]] = udiv i32 251, [[OR]]
; CHECK-NEXT: ret i32 [[DIV]]
@@ -96,8 +96,8 @@ define i32 @not_udiv_constant_quotient_known_smaller_than_denom(i32 %x) {
; This would require computing known bits on both x and y. Is it worth doing?
-define i32 @udiv_quotient_known_smaller_than_denom(i32 %x, i32 %y) {
-; CHECK-LABEL: @udiv_quotient_known_smaller_than_denom(
+define i32 @udiv_dividend_known_smaller_than_divisor(i32 %x, i32 %y) {
+; CHECK-LABEL: @udiv_dividend_known_smaller_than_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 250
; CHECK-NEXT: [[OR:%.*]] = or i32 %y, 251
; CHECK-NEXT: [[DIV:%.*]] = udiv i32 [[AND]], [[OR]]
@@ -109,8 +109,8 @@ define i32 @udiv_quotient_known_smaller_than_denom(i32 %x, i32 %y) {
ret i32 %div
}
-define i32 @not_udiv_quotient_known_smaller_than_denom(i32 %x, i32 %y) {
-; CHECK-LABEL: @not_udiv_quotient_known_smaller_than_denom(
+define i32 @not_udiv_dividend_known_smaller_than_divisor(i32 %x, i32 %y) {
+; CHECK-LABEL: @not_udiv_dividend_known_smaller_than_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 251
; CHECK-NEXT: [[OR:%.*]] = or i32 %y, 251
; CHECK-NEXT: [[DIV:%.*]] = udiv i32 [[AND]], [[OR]]
diff --git a/llvm/test/Transforms/InstSimplify/rem.ll b/llvm/test/Transforms/InstSimplify/rem.ll
index 05818043bc1..4a430d32af9 100644
--- a/llvm/test/Transforms/InstSimplify/rem.ll
+++ b/llvm/test/Transforms/InstSimplify/rem.ll
@@ -104,8 +104,8 @@ define i32 @rem3(i32 %x, i32 %n) {
ret i32 %mod1
}
-define i32 @urem_quotient_known_smaller_than_constant_denom(i32 %x) {
-; CHECK-LABEL: @urem_quotient_known_smaller_than_constant_denom(
+define i32 @urem_dividend_known_smaller_than_constant_divisor(i32 %x) {
+; CHECK-LABEL: @urem_dividend_known_smaller_than_constant_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 250
; CHECK-NEXT: ret i32 [[AND]]
;
@@ -114,8 +114,8 @@ define i32 @urem_quotient_known_smaller_than_constant_denom(i32 %x) {
ret i32 %r
}
-define i32 @not_urem_quotient_known_smaller_than_constant_denom(i32 %x) {
-; CHECK-LABEL: @not_urem_quotient_known_smaller_than_constant_denom(
+define i32 @not_urem_dividend_known_smaller_than_constant_divisor(i32 %x) {
+; CHECK-LABEL: @not_urem_dividend_known_smaller_than_constant_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 251
; CHECK-NEXT: [[R:%.*]] = urem i32 [[AND]], 251
; CHECK-NEXT: ret i32 [[R]]
@@ -125,8 +125,8 @@ define i32 @not_urem_quotient_known_smaller_than_constant_denom(i32 %x) {
ret i32 %r
}
-define i32 @urem_constant_quotient_known_smaller_than_denom(i32 %x) {
-; CHECK-LABEL: @urem_constant_quotient_known_smaller_than_denom(
+define i32 @urem_constant_dividend_known_smaller_than_divisor(i32 %x) {
+; CHECK-LABEL: @urem_constant_dividend_known_smaller_than_divisor(
; CHECK-NEXT: ret i32 250
;
%or = or i32 %x, 251
@@ -134,8 +134,8 @@ define i32 @urem_constant_quotient_known_smaller_than_denom(i32 %x) {
ret i32 %r
}
-define i32 @not_urem_constant_quotient_known_smaller_than_denom(i32 %x) {
-; CHECK-LABEL: @not_urem_constant_quotient_known_smaller_than_denom(
+define i32 @not_urem_constant_dividend_known_smaller_than_divisor(i32 %x) {
+; CHECK-LABEL: @not_urem_constant_dividend_known_smaller_than_divisor(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, 251
; CHECK-NEXT: [[R:%.*]] = urem i32 251, [[OR]]
; CHECK-NEXT: ret i32 [[R]]
@@ -147,8 +147,8 @@ define i32 @not_urem_constant_quotient_known_smaller_than_denom(i32 %x) {
; This would require computing known bits on both x and y. Is it worth doing?
-define i32 @urem_quotient_known_smaller_than_denom(i32 %x, i32 %y) {
-; CHECK-LABEL: @urem_quotient_known_smaller_than_denom(
+define i32 @urem_dividend_known_smaller_than_divisor(i32 %x, i32 %y) {
+; CHECK-LABEL: @urem_dividend_known_smaller_than_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 250
; CHECK-NEXT: [[OR:%.*]] = or i32 %y, 251
; CHECK-NEXT: [[R:%.*]] = urem i32 [[AND]], [[OR]]
@@ -160,8 +160,8 @@ define i32 @urem_quotient_known_smaller_than_denom(i32 %x, i32 %y) {
ret i32 %r
}
-define i32 @not_urem_quotient_known_smaller_than_denom(i32 %x, i32 %y) {
-; CHECK-LABEL: @not_urem_quotient_known_smaller_than_denom(
+define i32 @not_urem_dividend_known_smaller_than_divisor(i32 %x, i32 %y) {
+; CHECK-LABEL: @not_urem_dividend_known_smaller_than_divisor(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 251
; CHECK-NEXT: [[OR:%.*]] = or i32 %y, 251
; CHECK-NEXT: [[R:%.*]] = urem i32 [[AND]], [[OR]]
diff --git a/llvm/test/Transforms/InstSimplify/signed-div-rem.ll b/llvm/test/Transforms/InstSimplify/signed-div-rem.ll
index 84c14757f8a..1812edd3c64 100644
--- a/llvm/test/Transforms/InstSimplify/signed-div-rem.ll
+++ b/llvm/test/Transforms/InstSimplify/signed-div-rem.ll
@@ -88,8 +88,8 @@ define i32 @not_sdiv_zext_small_divisor(i8 %x) {
ret i32 %div
}
-define i32 @sdiv_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @sdiv_quotient_known_smaller_than_pos_divisor_clear_bits(
+define i32 @sdiv_dividend_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @sdiv_dividend_known_smaller_than_pos_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[AND]], 254
; CHECK-NEXT: ret i32 [[DIV]]
@@ -99,8 +99,8 @@ define i32 @sdiv_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
ret i32 %div
}
-define i32 @not_sdiv_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @not_sdiv_quotient_known_smaller_than_pos_divisor_clear_bits(
+define i32 @not_sdiv_dividend_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @not_sdiv_dividend_known_smaller_than_pos_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[AND]], 253
; CHECK-NEXT: ret i32 [[DIV]]
@@ -110,8 +110,8 @@ define i32 @not_sdiv_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x)
ret i32 %div
}
-define i32 @sdiv_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @sdiv_quotient_known_smaller_than_neg_divisor_clear_bits(
+define i32 @sdiv_dividend_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @sdiv_dividend_known_smaller_than_neg_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[AND]], -254
; CHECK-NEXT: ret i32 [[DIV]]
@@ -121,8 +121,8 @@ define i32 @sdiv_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
ret i32 %div
}
-define i32 @not_sdiv_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @not_sdiv_quotient_known_smaller_than_neg_divisor_clear_bits(
+define i32 @not_sdiv_dividend_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @not_sdiv_dividend_known_smaller_than_neg_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[AND]], -253
; CHECK-NEXT: ret i32 [[DIV]]
@@ -132,8 +132,8 @@ define i32 @not_sdiv_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x)
ret i32 %div
}
-define i32 @sdiv_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @sdiv_quotient_known_smaller_than_pos_divisor_set_bits(
+define i32 @sdiv_dividend_known_smaller_than_pos_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @sdiv_dividend_known_smaller_than_pos_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[OR]], 254
; CHECK-NEXT: ret i32 [[DIV]]
@@ -143,8 +143,8 @@ define i32 @sdiv_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
ret i32 %div
}
-define i32 @not_sdiv_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @not_sdiv_quotient_known_smaller_than_pos_divisor_set_bits(
+define i32 @not_sdiv_dividend_known_smaller_than_pos_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @not_sdiv_dividend_known_smaller_than_pos_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[OR]], 253
; CHECK-NEXT: ret i32 [[DIV]]
@@ -154,8 +154,8 @@ define i32 @not_sdiv_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
ret i32 %div
}
-define i32 @sdiv_quotient_known_smaller_than_neg_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @sdiv_quotient_known_smaller_than_neg_divisor_set_bits(
+define i32 @sdiv_dividend_known_smaller_than_neg_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @sdiv_dividend_known_smaller_than_neg_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[OR]], -254
; CHECK-NEXT: ret i32 [[DIV]]
@@ -165,8 +165,8 @@ define i32 @sdiv_quotient_known_smaller_than_neg_divisor_set_bits(i32 %x) {
ret i32 %div
}
-define i32 @not_sdiv_quotient_known_smaller_than_neg_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @not_sdiv_quotient_known_smaller_than_neg_divisor_set_bits(
+define i32 @not_sdiv_dividend_known_smaller_than_neg_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @not_sdiv_dividend_known_smaller_than_neg_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[DIV:%.*]] = sdiv i32 [[OR]], -253
; CHECK-NEXT: ret i32 [[DIV]]
@@ -264,8 +264,8 @@ define i32 @not_srem_zext_small_divisor(i8 %x) {
ret i32 %rem
}
-define i32 @srem_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @srem_quotient_known_smaller_than_pos_divisor_clear_bits(
+define i32 @srem_dividend_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @srem_dividend_known_smaller_than_pos_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[AND]], 254
; CHECK-NEXT: ret i32 [[REM]]
@@ -275,8 +275,8 @@ define i32 @srem_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
ret i32 %rem
}
-define i32 @not_srem_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @not_srem_quotient_known_smaller_than_pos_divisor_clear_bits(
+define i32 @not_srem_dividend_known_smaller_than_pos_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @not_srem_dividend_known_smaller_than_pos_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[AND]], 253
; CHECK-NEXT: ret i32 [[REM]]
@@ -286,8 +286,8 @@ define i32 @not_srem_quotient_known_smaller_than_pos_divisor_clear_bits(i32 %x)
ret i32 %rem
}
-define i32 @srem_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @srem_quotient_known_smaller_than_neg_divisor_clear_bits(
+define i32 @srem_dividend_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @srem_dividend_known_smaller_than_neg_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[AND]], -254
; CHECK-NEXT: ret i32 [[REM]]
@@ -297,8 +297,8 @@ define i32 @srem_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
ret i32 %rem
}
-define i32 @not_srem_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
-; CHECK-LABEL: @not_srem_quotient_known_smaller_than_neg_divisor_clear_bits(
+define i32 @not_srem_dividend_known_smaller_than_neg_divisor_clear_bits(i32 %x) {
+; CHECK-LABEL: @not_srem_dividend_known_smaller_than_neg_divisor_clear_bits(
; CHECK-NEXT: [[AND:%.*]] = and i32 %x, 253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[AND]], -253
; CHECK-NEXT: ret i32 [[REM]]
@@ -308,8 +308,8 @@ define i32 @not_srem_quotient_known_smaller_than_neg_divisor_clear_bits(i32 %x)
ret i32 %rem
}
-define i32 @srem_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @srem_quotient_known_smaller_than_pos_divisor_set_bits(
+define i32 @srem_dividend_known_smaller_than_pos_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @srem_dividend_known_smaller_than_pos_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[OR]], 254
; CHECK-NEXT: ret i32 [[REM]]
@@ -319,8 +319,8 @@ define i32 @srem_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
ret i32 %rem
}
-define i32 @not_srem_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @not_srem_quotient_known_smaller_than_pos_divisor_set_bits(
+define i32 @not_srem_dividend_known_smaller_than_pos_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @not_srem_dividend_known_smaller_than_pos_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[OR]], 253
; CHECK-NEXT: ret i32 [[REM]]
@@ -330,8 +330,8 @@ define i32 @not_srem_quotient_known_smaller_than_pos_divisor_set_bits(i32 %x) {
ret i32 %rem
}
-define i32 @srem_quotient_known_smaller_than_neg_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @srem_quotient_known_smaller_than_neg_divisor_set_bits(
+define i32 @srem_dividend_known_smaller_than_neg_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @srem_dividend_known_smaller_than_neg_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[OR]], -254
; CHECK-NEXT: ret i32 [[REM]]
@@ -341,8 +341,8 @@ define i32 @srem_quotient_known_smaller_than_neg_divisor_set_bits(i32 %x) {
ret i32 %rem
}
-define i32 @not_srem_quotient_known_smaller_than_neg_divisor_set_bits(i32 %x) {
-; CHECK-LABEL: @not_srem_quotient_known_smaller_than_neg_divisor_set_bits(
+define i32 @not_srem_dividend_known_smaller_than_neg_divisor_set_bits(i32 %x) {
+; CHECK-LABEL: @not_srem_dividend_known_smaller_than_neg_divisor_set_bits(
; CHECK-NEXT: [[OR:%.*]] = or i32 %x, -253
; CHECK-NEXT: [[REM:%.*]] = srem i32 [[OR]], -253
; CHECK-NEXT: ret i32 [[REM]]
OpenPOWER on IntegriCloud