mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
add tests for vector urem
llvm-svn: 270271
This commit is contained in:
parent
08b442df36
commit
156965ba77
@ -1,4 +1,4 @@
|
||||
; This test makes sure that urem instructions are properly eliminated.
|
||||
; This test makes sure that rem instructions are properly eliminated.
|
||||
;
|
||||
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||
; END.
|
||||
@ -25,6 +25,28 @@ define i32 @test3(i32 %A) {
|
||||
ret i32 %B
|
||||
}
|
||||
|
||||
; FIXME: This could be an 'and' just like above.
|
||||
|
||||
define <2 x i32> @vec_power_of_2_constant_splat_divisor(<2 x i32> %A) {
|
||||
; CHECK-LABEL: @vec_power_of_2_constant_splat_divisor(
|
||||
; CHECK-NEXT: [[B:%.*]] = urem <2 x i32> %A, <i32 8, i32 8>
|
||||
; CHECK-NEXT: ret <2 x i32> [[B]]
|
||||
;
|
||||
%B = urem <2 x i32> %A, <i32 8, i32 8>
|
||||
ret <2 x i32> %B
|
||||
}
|
||||
|
||||
; FIXME: And it shouldn't matter whether we have ConstantVector or ConstantDataVector.
|
||||
|
||||
define <2 x i19> @weird_vec_power_of_2_constant_splat_divisor(<2 x i19> %A) {
|
||||
; CHECK-LABEL: @weird_vec_power_of_2_constant_splat_divisor(
|
||||
; CHECK-NEXT: [[B:%.*]] = urem <2 x i19> %A, <i19 8, i19 8>
|
||||
; CHECK-NEXT: ret <2 x i19> [[B]]
|
||||
;
|
||||
%B = urem <2 x i19> %A, <i19 8, i19 8>
|
||||
ret <2 x i19> %B
|
||||
}
|
||||
|
||||
define i1 @test3a(i32 %A) {
|
||||
; CHECK-LABEL: @test3a(
|
||||
; CHECK-NEXT: [[AND:%.*]] = and i32 %A, 7
|
||||
|
Loading…
Reference in New Issue
Block a user