[llvm] r312943 - [InstSimplify] fix some test names; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 13:38:31 PDT 2017
Author: spatel
Date: Mon Sep 11 13:38:31 2017
New Revision: 312943
URL: http://llvm.org/viewvc/llvm-project?rev=312943&view=rev
Log:
[InstSimplify] fix some test names; NFC
Too much division...the quotient is the answer.
Modified:
llvm/trunk/test/Transforms/InstSimplify/div.ll
llvm/trunk/test/Transforms/InstSimplify/rem.ll
llvm/trunk/test/Transforms/InstSimplify/signed-div-rem.ll
Modified: llvm/trunk/test/Transforms/InstSimplify/div.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/div.ll?rev=312943&r1=312942&r2=312943&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/div.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/div.ll Mon Sep 11 13:38:31 2017
@@ -54,8 +54,8 @@ define <2 x i1> @udiv_bool_vec(<2 x i1>
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_
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_smal
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
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_k
; 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_
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]]
Modified: llvm/trunk/test/Transforms/InstSimplify/rem.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/rem.ll?rev=312943&r1=312942&r2=312943&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/rem.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/rem.ll Mon Sep 11 13:38:31 2017
@@ -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_
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_smal
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
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_k
; 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_
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]]
Modified: llvm/trunk/test/Transforms/InstSimplify/signed-div-rem.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/signed-div-rem.ll?rev=312943&r1=312942&r2=312943&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/signed-div-rem.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/signed-div-rem.ll Mon Sep 11 13:38:31 2017
@@ -88,8 +88,8 @@ define i32 @not_sdiv_zext_small_divisor(
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_
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_smal
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_
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_smal
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_
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_smal
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_
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(
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_
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_smal
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_
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_smal
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_
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_smal
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_
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]]
More information about the llvm-commits
mailing list