mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-19 10:15:00 +00:00
[X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4388ffce8e
commit
81c3344bd0
@ -7643,6 +7643,12 @@ bool X86InstrInfo::isAssociativeAndCommutative(const MachineInstr &Inst) const {
|
||||
case X86::PANDrr:
|
||||
case X86::PORrr:
|
||||
case X86::PXORrr:
|
||||
case X86::ANDPDrr:
|
||||
case X86::ANDPSrr:
|
||||
case X86::ORPDrr:
|
||||
case X86::ORPSrr:
|
||||
case X86::XORPDrr:
|
||||
case X86::XORPSrr:
|
||||
case X86::VPANDrr:
|
||||
case X86::VPANDYrr:
|
||||
case X86::VPANDDZ128rr:
|
||||
@ -7667,6 +7673,36 @@ bool X86InstrInfo::isAssociativeAndCommutative(const MachineInstr &Inst) const {
|
||||
case X86::VPXORQZ128rr:
|
||||
case X86::VPXORQZ256rr:
|
||||
case X86::VPXORQZrr:
|
||||
case X86::VANDPDrr:
|
||||
case X86::VANDPSrr:
|
||||
case X86::VANDPDYrr:
|
||||
case X86::VANDPSYrr:
|
||||
case X86::VANDPDZ128rr:
|
||||
case X86::VANDPSZ128rr:
|
||||
case X86::VANDPDZ256rr:
|
||||
case X86::VANDPSZ256rr:
|
||||
case X86::VANDPDZrr:
|
||||
case X86::VANDPSZrr:
|
||||
case X86::VORPDrr:
|
||||
case X86::VORPSrr:
|
||||
case X86::VORPDYrr:
|
||||
case X86::VORPSYrr:
|
||||
case X86::VORPDZ128rr:
|
||||
case X86::VORPSZ128rr:
|
||||
case X86::VORPDZ256rr:
|
||||
case X86::VORPSZ256rr:
|
||||
case X86::VORPDZrr:
|
||||
case X86::VORPSZrr:
|
||||
case X86::VXORPDrr:
|
||||
case X86::VXORPSrr:
|
||||
case X86::VXORPDYrr:
|
||||
case X86::VXORPSYrr:
|
||||
case X86::VXORPDZ128rr:
|
||||
case X86::VXORPSZ128rr:
|
||||
case X86::VXORPDZ256rr:
|
||||
case X86::VXORPSZ256rr:
|
||||
case X86::VXORPDZrr:
|
||||
case X86::VXORPSZrr:
|
||||
// Normal min/max instructions are not commutative because of NaN and signed
|
||||
// zero semantics, but these are. Thus, there's no need to check for global
|
||||
// relaxed math; the instructions themselves have the properties we need.
|
||||
|
@ -9,8 +9,8 @@ define <8 x i32> @test(<8 x float> %a, <8 x float> %b) {
|
||||
; CHECK-NEXT: vsubps %ymm2, %ymm1, %ymm3
|
||||
; CHECK-NEXT: vcmpltps %ymm1, %ymm0, %ymm0
|
||||
; CHECK-NEXT: vcmpltps %ymm3, %ymm2, %ymm1
|
||||
; CHECK-NEXT: vandps {{.*}}(%rip), %ymm1, %ymm1
|
||||
; CHECK-NEXT: vandps %ymm1, %ymm0, %ymm0
|
||||
; CHECK-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
|
||||
; CHECK-NEXT: retq
|
||||
%c1 = fadd <8 x float> %a, %b
|
||||
%b1 = fmul <8 x float> %b, %a
|
||||
|
@ -13,8 +13,8 @@ define void @and_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwi
|
||||
; X32-NEXT: vcmpltps %ymm0, %ymm1, %ymm1
|
||||
; X32-NEXT: vmovups (%eax), %ymm2
|
||||
; X32-NEXT: vcmpltps %ymm0, %ymm2, %ymm0
|
||||
; X32-NEXT: vandps LCPI0_0, %ymm1, %ymm1
|
||||
; X32-NEXT: vandps %ymm1, %ymm0, %ymm0
|
||||
; X32-NEXT: vandps LCPI0_0, %ymm0, %ymm0
|
||||
; X32-NEXT: vmovaps %ymm0, (%eax)
|
||||
; X32-NEXT: vzeroupper
|
||||
; X32-NEXT: retl
|
||||
@ -26,8 +26,8 @@ define void @and_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwi
|
||||
; X64-NEXT: vcmpltps %ymm0, %ymm1, %ymm1
|
||||
; X64-NEXT: vmovups (%rdx), %ymm2
|
||||
; X64-NEXT: vcmpltps %ymm0, %ymm2, %ymm0
|
||||
; X64-NEXT: vandps {{.*}}(%rip), %ymm1, %ymm1
|
||||
; X64-NEXT: vandps %ymm1, %ymm0, %ymm0
|
||||
; X64-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
|
||||
; X64-NEXT: vmovaps %ymm0, (%rax)
|
||||
; X64-NEXT: vzeroupper
|
||||
; X64-NEXT: retq
|
||||
|
Loading…
x
Reference in New Issue
Block a user