diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td @@ -1073,14 +1073,14 @@ (!cast("PseudoVMXOR_MM_" # mti.LMul.MX) VR:$rs1, VR:$rs2, GPR:$vl, mti.Log2SEW)>; - def : Pat<(mti.Mask (riscv_vmand_vl (riscv_vmnot_vl VR:$rs1, - VLOpFrag), - VR:$rs2, VLOpFrag)), + def : Pat<(mti.Mask (riscv_vmand_vl VR:$rs1, + (riscv_vmnot_vl VR:$rs2, VLOpFrag), + VLOpFrag)), (!cast("PseudoVMANDNOT_MM_" # mti.LMul.MX) VR:$rs1, VR:$rs2, GPR:$vl, mti.Log2SEW)>; - def : Pat<(mti.Mask (riscv_vmor_vl (riscv_vmnot_vl VR:$rs1, - VLOpFrag), - VR:$rs2, VLOpFrag)), + def : Pat<(mti.Mask (riscv_vmor_vl VR:$rs1, + (riscv_vmnot_vl VR:$rs2, VLOpFrag), + VLOpFrag)), (!cast("PseudoVMORNOT_MM_" # mti.LMul.MX) VR:$rs1, VR:$rs2, GPR:$vl, mti.Log2SEW)>; // XOR is associative so we need 2 patterns for VMXNOR. diff --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-logic.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-logic.ll --- a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-logic.ll +++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-logic.ll @@ -75,7 +75,7 @@ ; CHECK-NEXT: vsetivli a2, 8, e8,mf2,ta,mu ; CHECK-NEXT: vle1.v v25, (a0) ; CHECK-NEXT: vle1.v v26, (a1) -; CHECK-NEXT: vmandnot.mm v25, v25, v26 +; CHECK-NEXT: vmandnot.mm v25, v26, v25 ; CHECK-NEXT: vse1.v v25, (a0) ; CHECK-NEXT: ret %a = load <8 x i1>, <8 x i1>* %x @@ -92,7 +92,7 @@ ; CHECK-NEXT: vsetivli a2, 16, e8,m1,ta,mu ; CHECK-NEXT: vle1.v v25, (a0) ; CHECK-NEXT: vle1.v v26, (a1) -; CHECK-NEXT: vmornot.mm v25, v25, v26 +; CHECK-NEXT: vmornot.mm v25, v26, v25 ; CHECK-NEXT: vse1.v v25, (a0) ; CHECK-NEXT: ret %a = load <16 x i1>, <16 x i1>* %x diff --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll --- a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll +++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-int.ll @@ -15,7 +15,7 @@ ; CHECK-NEXT: vsetivli a0, 1, e8,mf8,ta,mu ; CHECK-NEXT: vmv.v.x v25, a1 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -36,7 +36,7 @@ ; CHECK-NEXT: vsetivli a1, 1, e8,mf8,ta,mu ; CHECK-NEXT: vmv.v.x v25, a0 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -56,7 +56,7 @@ ; CHECK-NEXT: vsetivli a0, 2, e8,mf8,ta,mu ; CHECK-NEXT: vmv.v.x v25, a1 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -77,7 +77,7 @@ ; CHECK-NEXT: vsetivli a1, 2, e8,mf8,ta,mu ; CHECK-NEXT: vmv.v.x v25, a0 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -97,7 +97,7 @@ ; CHECK-NEXT: vsetivli a0, 4, e8,mf4,ta,mu ; CHECK-NEXT: vmv.v.x v25, a1 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -118,7 +118,7 @@ ; CHECK-NEXT: vsetivli a1, 4, e8,mf4,ta,mu ; CHECK-NEXT: vmv.v.x v25, a0 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -138,7 +138,7 @@ ; CHECK-NEXT: vsetivli a0, 8, e8,mf2,ta,mu ; CHECK-NEXT: vmv.v.x v25, a1 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -159,7 +159,7 @@ ; CHECK-NEXT: vsetivli a1, 8, e8,mf2,ta,mu ; CHECK-NEXT: vmv.v.x v25, a0 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -179,7 +179,7 @@ ; CHECK-NEXT: vsetivli a0, 16, e8,m1,ta,mu ; CHECK-NEXT: vmv.v.x v25, a1 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret @@ -200,7 +200,7 @@ ; CHECK-NEXT: vsetivli a1, 16, e8,m1,ta,mu ; CHECK-NEXT: vmv.v.x v25, a0 ; CHECK-NEXT: vmsne.vi v26, v25, 0 -; CHECK-NEXT: vmandnot.mm v25, v26, v8 +; CHECK-NEXT: vmandnot.mm v25, v8, v26 ; CHECK-NEXT: vmand.mm v26, v0, v26 ; CHECK-NEXT: vmor.mm v0, v26, v25 ; CHECK-NEXT: ret