From 53deef9e0b8ffa1a4a9c0f88b5fc0621978f9ea6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 22 Dec 2020 11:40:51 -0800 Subject: [PATCH] [RISCV] Remove unneeded !eq comparing a single bit value to 0/1 in RISCVInstrInfoVPseudos.td. NFC Instead we can either use the bit directly. If it was checking for 0 we need to swap the operands or use !not. --- llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td | 46 ++++++++++++------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td index 67bdfa8..c28bd30 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td @@ -543,7 +543,7 @@ class VPseudoBinaryCarryIn : Pseudo<(outs RetClass:$rd), - !if(!eq(CarryIn, 1), + !if(CarryIn, (ins Op1Class:$rs2, Op2Class:$rs1, VMV0:$carry, GPR:$vl, ixlenimm:$sew), (ins Op1Class:$rs2, Op2Class:$rs1, GPR:$vl, ixlenimm:$sew)), []>, @@ -554,8 +554,8 @@ class VPseudoBinaryCarryIn(PseudoToVInst.VInst); let VLMul = MInfo.value; @@ -675,8 +675,8 @@ multiclass VPseudoBinaryV_VV { multiclass VPseudoBinaryV_VX { foreach m = MxList.m in - defm !if(!eq(IsFloat, 0), "_VX", "_VF") : VPseudoBinary; + defm !if(IsFloat, "_VF", "_VX") : VPseudoBinary; } multiclass VPseudoBinaryV_VI { @@ -699,8 +699,8 @@ multiclass VPseudoBinaryW_VV { multiclass VPseudoBinaryW_VX { foreach m = MxList.m[0-5] in - defm !if(!eq(IsFloat, 0), "_VX", "_VF") : VPseudoBinary; } @@ -712,8 +712,8 @@ multiclass VPseudoBinaryW_WV { multiclass VPseudoBinaryW_WX { foreach m = MxList.m[0-5] in - defm !if(!eq(IsFloat, 0), "_WX", "_WF") : VPseudoBinary; } @@ -741,9 +741,9 @@ multiclass VPseudoBinaryV_WI { multiclass VPseudoBinaryV_VM { foreach m = MxList.m in - def "_VV" # !if(!eq(CarryIn, 1), "M", "") # "_" # m.MX : - VPseudoBinaryCarryIn.R, m.vrclass)), m.vrclass, m.vrclass, m, CarryIn, Constraint>; } @@ -751,9 +751,9 @@ multiclass VPseudoBinaryV_VM { foreach m = MxList.m in - def "_VX" # !if(!eq(CarryIn, 1), "M", "") # "_" # m.MX : - VPseudoBinaryCarryIn.R, m.vrclass)), m.vrclass, GPR, m, CarryIn, Constraint>; } @@ -761,9 +761,9 @@ multiclass VPseudoBinaryV_XM { foreach m = MxList.m in - def "_VI" # !if(!eq(CarryIn, 1), "M", "") # "_" # m.MX : - VPseudoBinaryCarryIn.R, m.vrclass)), m.vrclass, simm5, m, CarryIn, Constraint>; } @@ -789,8 +789,8 @@ multiclass VPseudoBinaryM_VV { multiclass VPseudoBinaryM_VX { foreach m = MxList.m in - defm !if(!eq(IsFloat, 0), "_VX", "_VF") : - VPseudoBinary; } @@ -1374,7 +1374,7 @@ multiclass VPatBinaryV_VM { foreach vti = AllIntegerVectors in defm : VPatBinaryCarryIn; @@ -1384,7 +1384,7 @@ multiclass VPatBinaryV_XM { foreach vti = AllIntegerVectors in defm : VPatBinaryCarryIn; @@ -1394,7 +1394,7 @@ multiclass VPatBinaryV_IM { foreach vti = AllIntegerVectors in defm : VPatBinaryCarryIn; -- 2.7.4