]> granicus.if.org Git - llvm/commitdiff
[InstSimplify] fix some test names; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 11 Sep 2017 20:38:31 +0000 (20:38 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 11 Sep 2017 20:38:31 +0000 (20:38 +0000)
Too much division...the quotient is the answer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312943 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstSimplify/div.ll
test/Transforms/InstSimplify/rem.ll
test/Transforms/InstSimplify/signed-div-rem.ll

index be17746c24fc6930cdb2f7bbbeeb54dd251b261b..a1cc85727241fcaa49e701d64f81cf265ffdb30a 100644 (file)
@@ -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]]
index 05818043bc1d781dbfd74d916e569dd23c49c3e0..4a430d32af930b65b7ede516bbeb7c6466968dc1 100644 (file)
@@ -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]]
index 84c14757f8a2a285d582aebcdef773ca7697c6b3..1812edd3c6456791274965635310000709bab9f6 100644 (file)
@@ -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]]