[InstSimplify] fix some test names; NFC

Too much division...the quotient is the answer.

llvm-svn: 312943
This commit is contained in:
Sanjay Patel 2017-09-11 20:38:31 +00:00
parent bf0d49c437
commit bb1b1c97fa
3 changed files with 56 additions and 56 deletions

View 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]]

View 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]]

View 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]]