1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[InstCombine] add test for missing vector icmp fold

llvm-svn: 278727
This commit is contained in:
Sanjay Patel 2016-08-15 20:02:40 +00:00
parent fb03d43314
commit e73dc8d89a

View File

@ -282,6 +282,18 @@ define i1 @test23(i32 %x) {
ret i1 %i4
}
; FIXME: Vectors should fold too.
define <2 x i1> @test23vec(<2 x i32> %x) {
; CHECK-LABEL: @test23vec(
; CHECK-NEXT: [[I3:%.*]] = sdiv <2 x i32> %x, <i32 -1328634635, i32 -1328634635>
; CHECK-NEXT: [[I4:%.*]] = icmp eq <2 x i32> [[I3]], <i32 -1, i32 -1>
; CHECK-NEXT: ret <2 x i1> [[I4]]
;
%i3 = sdiv <2 x i32> %x, <i32 -1328634635, i32 -1328634635>
%i4 = icmp eq <2 x i32> %i3, <i32 -1, i32 -1>
ret <2 x i1> %i4
}
@X = global [1000 x i32] zeroinitializer
; PR8882