Skip to content

Commit b3bad04

Browse files
author
Nimit Sachdeva
committed
test change
1 parent fb6c736 commit b3bad04

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

llvm/test/Transforms/InstCombine/usub_sat_to_msb_mask.ll

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
; RUN: opt -passes=instcombine -S < %s 2>&1 | FileCheck %s
44

5-
declare i8 @llvm.usub.sat.i8(i8, i8)
6-
declare i16 @llvm.usub.sat.i16(i16, i16)
7-
declare i32 @llvm.usub.sat.i32(i32, i32)
8-
declare i64 @llvm.usub.sat.i64(i64, i64)
9-
105
define i8 @test_i8(i8 %a, i8 %b) {
116
; CHECK-LABEL: define i8 @test_i8(
127
; CHECK-SAME: i8 [[A:%.*]], i8 [[B:%.*]]) {
@@ -146,15 +141,14 @@ define <4 x i32> @vector_test(<4 x i32> %a, <4 x i32> %b) {
146141

147142

148143
%a_sub = call <4 x i32> @llvm.usub.sat.v4i32(
149-
<4 x i32> %a,
150-
<4 x i32> <i32 2147483871, i32 2147483871, i32 2147483871, i32 2147483871>)
144+
<4 x i32> %a, <4 x i32> splat (i32 2147483871))
151145
%b_sub = call <4 x i32> @llvm.usub.sat.v4i32(
152-
<4 x i32> %b,
153-
<4 x i32> <i32 2147483887, i32 2147483887, i32 2147483887, i32 2147483887>)
146+
<4 x i32> %b, <4 x i32> splat (i32 2147483887))
154147
%or = or <4 x i32> %a_sub, %b_sub
155148
%cmp = icmp eq <4 x i32> %or, zeroinitializer
156-
%res = select <4 x i1> %cmp, <4 x i32> zeroinitializer,
157-
<4 x i32> <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>
149+
%res = select <4 x i1> %cmp,
150+
<4 x i32> zeroinitializer,
151+
<4 x i32> splat (i32 -2147483648)
158152
ret <4 x i32> %res
159153
}
160154

@@ -193,14 +187,13 @@ define <4 x i32> @vector_ne_test(<4 x i32> %a, <4 x i32> %b) {
193187

194188

195189
%a_sub = call <4 x i32> @llvm.usub.sat.v4i32(
196-
<4 x i32> %a,
197-
<4 x i32> <i32 2147483871, i32 2147483871, i32 2147483871, i32 2147483871>)
190+
<4 x i32> %a, <4 x i32> splat (i32 2147483871))
198191
%b_sub = call <4 x i32> @llvm.usub.sat.v4i32(
199-
<4 x i32> %b,
200-
<4 x i32> <i32 2147483887, i32 2147483887, i32 2147483887, i32 2147483887>)
192+
<4 x i32> %b, <4 x i32> splat (i32 2147483887))
201193
%or = or <4 x i32> %a_sub, %b_sub
202194
%cmp = icmp eq <4 x i32> %or, zeroinitializer
203-
%res = select <4 x i1> %cmp, <4 x i32> zeroinitializer,
204-
<4 x i32> <i32 -2147483648, i32 -2147483648, i32 -2147483648, i32 -2147483648>
195+
%res = select <4 x i1> %cmp,
196+
<4 x i32> zeroinitializer,
197+
<4 x i32> splat (i32 -2147483648)
205198
ret <4 x i32> %res
206199
}

0 commit comments

Comments
 (0)