https://github.com/lukel97 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/114971
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2954,20 +2954,13 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool
IsZeroCmp) const {
}
if (IsZeroCmp && ST->hasVInstructions()) {
-unsigned RealMinVLen = ST->getRealMinVLen();
-// Support Fractional LMULs if the lengths are larger than XLen.
-// T
@@ -2954,20 +2954,13 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool
IsZeroCmp) const {
}
if (IsZeroCmp && ST->hasVInstructions()) {
-unsigned RealMinVLen = ST->getRealMinVLen();
-// Support Fractional LMULs if the lengths are larger than XLen.
-// T
@@ -2954,20 +2954,13 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool
IsZeroCmp) const {
}
if (IsZeroCmp && ST->hasVInstructions()) {
-unsigned RealMinVLen = ST->getRealMinVLen();
-// Support Fractional LMULs if the lengths are larger than XLen.
-// T
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/114517
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -16172,8 +16233,6 @@ static SDValue performSETCCCombine(SDNode *N,
SelectionDAG &DAG,
N0.getConstantOperandVal(1) != UINT64_C(0x))
return SDValue();
- // Looking for an equality compare.
- ISD::CondCode Cond = cast(N->getOperand(2))->get();
if (!isIn
@@ -2952,5 +2952,22 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool
IsZeroCmp) const {
Options.LoadSizes = {4, 2, 1};
Options.AllowedTailExpansions = {3};
}
+
+ if (IsZeroCmp && ST->hasVInstructions() && ST->enableUnalignedVectorMem()) {
l
@@ -14520,17 +14520,78 @@ static bool narrowIndex(SDValue &N, ISD::MemIndexType
IndexType, SelectionDAG &D
return true;
}
+/// Try to map an integer comparison with size > XLEN to vector instructions
+/// before type legalization splits it up into chunks.
+static SDValue
+c
@@ -14520,17 +14520,78 @@ static bool narrowIndex(SDValue &N, ISD::MemIndexType
IndexType, SelectionDAG &D
return true;
}
+/// Try to map an integer comparison with size > XLEN to vector instructions
+/// before type legalization splits it up into chunks.
+static SDValue
+c
https://github.com/lukel97 approved this pull request.
https://github.com/llvm/llvm-project/pull/136688
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
lukel97 wrote:
I collected some more data on RISC-V on SPEC CPU 2017, this improves code size
by up to 7% on some benchmarks, and no regressions were found:
https://lnt.lukelau.me/db_default/v4/nts/399?show_delta=yes&show_previous=yes&show_stddev=yes&show_mad=yes&show_all=yes&show_all_samples=y
https://github.com/lukel97 approved this pull request.
Thanks for fixing the cherry-pick. Re: #124499, I couldn't think of a simple
fix we could apply on top of e3fbf19eb4428cac03c0e7301512f11f8947d743 for the
20.x release branch.
I think it's best if we cherry-pick the revert so that performa
https://github.com/lukel97 approved this pull request.
https://github.com/llvm/llvm-project/pull/125659
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/117948
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 approved this pull request.
Good catch. I double checked and we're setting ElementsDependOnVL and
ElementsDependOnMask for VCPOP_M and VFIRST_M so adding RISCVMaskedPseudo
should be safe.
https://github.com/llvm/llvm-project/pull/115162
__
@@ -1150,6 +1150,7 @@ class VPseudoUnaryNoMaskGPROut :
class VPseudoUnaryMaskGPROut :
Pseudo<(outs GPR:$rd),
(ins VR:$rs1, VMaskOp:$vm, AVL:$vl, sew:$sew), []>,
+ RISCVMaskedPseudo,
lukel97 wrote:
Nit, add instead of adding it in the cl
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/115162
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -14520,17 +14520,78 @@ static bool narrowIndex(SDValue &N, ISD::MemIndexType
IndexType, SelectionDAG &D
return true;
}
+/// Try to map an integer comparison with size > XLEN to vector instructions
+/// before type legalization splits it up into chunks.
+static SDValue
+c
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/114517
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2525,5 +2527,21 @@ RISCVTTIImpl::enableMemCmpExpansion(bool OptSize, bool
IsZeroCmp) const {
Options.LoadSizes = {8, 4, 2, 1};
else
Options.LoadSizes = {4, 2, 1};
+ if (IsZeroCmp && ST->hasVInstructions()) {
lukel97 wrote:
Doesn't this mean tha
@@ -14520,17 +14520,78 @@ static bool narrowIndex(SDValue &N, ISD::MemIndexType
IndexType, SelectionDAG &D
return true;
}
+/// Try to map an integer comparison with size > XLEN to vector instructions
+/// before type legalization splits it up into chunks.
+static SDValue
+c
lukel97 wrote:
> > > The run just finished, I'm seeing a 0.75% improvement on 500.perlbench_r
> > > on the BPI F3 (-O3 -mcpu=spacemit-x60), no regressions or improvements on
> > > the other benchmarks as far as I can see. Seems to check out with the
> > > number of memcmps inlined reported for
lukel97 wrote:
The run just finished, I'm seeing a 0.75% improvement on 500.perlbench_r, no
regressions or improvements on the other benchmarks as far as I can see. Seems
to check out with the number of memcmps inlined reported for perlbench!
https://github.com/llvm/llvm-project/pull/107548
__
lukel97 wrote:
I collected the stats on the number of memcmps that were inlined, it looks like
we're able to expand a good chunk of them:
```
Program expand-memcmp.NumMemCmpCalls
expand-memcmp.NumMemCmpInlined
https://github.com/lukel97 closed
https://github.com/llvm/llvm-project/pull/101124
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/101464
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 milestoned
https://github.com/llvm/llvm-project/pull/101464
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 created
https://github.com/llvm/llvm-project/pull/101464
This is a backport of #101152 which fixes a miscompile on RISC-V, albeit not a
regression.
>From 6b7c614ad8a69dfb610ed02da541fb8d3bf009e3 Mon Sep 17 00:00:00 2001
From: Luke Lau
Date: Wed, 31 Jul 2024 00:28:52
lukel97 wrote:
It's a miscompile, but it wasn't a regression since it looks like we've had it
since LLVM 16
https://github.com/llvm/llvm-project/pull/101124
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org
https://github.com/lukel97 approved this pull request.
https://github.com/llvm/llvm-project/pull/94313
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -2211,6 +,16 @@ ParseStatus RISCVAsmParser::parseVTypeI(OperandVector
&Operands) {
if (getLexer().is(AsmToken::EndOfStatement) && State == VTypeState_Done) {
RISCVII::VLMUL VLMUL = RISCVVType::encodeLMUL(Lmul, Fractional);
+if (Fractional) {
+ unsigned E
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/94313
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -71,18 +73,21 @@ vsetvli a2, a0, e32, m8, ta, ma
vsetvli a2, a0, e32, mf2, ta, ma
# CHECK-INST: vsetvli a2, a0, e32, mf2, ta, ma
+# CHECK-WARNING: :[[#@LINE-2]]:17: warning: SEW > 16 may not be compatible
with all RVV implementations{{$}}
# CHECK-ENCODING: [0x57,0x76,0x75
@@ -71,18 +73,21 @@ vsetvli a2, a0, e32, m8, ta, ma
vsetvli a2, a0, e32, mf2, ta, ma
# CHECK-INST: vsetvli a2, a0, e32, mf2, ta, ma
+# CHECK-WARNING: :[[#@LINE-2]]:17: warning: SEW > 16 may not be compatible
with all RVV implementations{{$}}
# CHECK-ENCODING: [0x57,0x76,0x75
@@ -1,5 +1,7 @@
# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \
# RUN:| FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
+# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+zve32x %s 2>&1 \
+# RUN:| FileCheck %s --check-prefix=CHECK-WARNI
https://github.com/lukel97 approved this pull request.
Chiming in that this seems reasonable to me, given the performance impact of
not having unaligned scalar accesses. And hopefully we can remove this one
we're settled on a proper interface.
https://github.com/llvm/llvm-project/pull/92143
__
@@ -194,15 +194,12 @@ define void @vpmerge_vpload_store(
%passthru, ptr %p, , i64 } @llvm.riscv.vleff.nxv2i32(, ptr, i64)
define @vpmerge_vleff( %passthru, ptr %p,
%m, i32 zeroext %vl) {
; CHECK-LABEL: vpmerge_vleff:
; CHECK: # %bb.0:
-; CHECK-NEXT:vsetvli zero, a
https://github.com/lukel97 approved this pull request.
https://github.com/llvm/llvm-project/pull/90049
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/90049
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 edited
https://github.com/llvm/llvm-project/pull/90049
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 commented:
Removing it from vleNff sense to me. As long as we have the implicit-def $vl on
the pseudo to prevent it being moved between vsetvlis I think it should be ok.
https://github.com/llvm/llvm-project/pull/90049
___
l
https://github.com/lukel97 approved this pull request.
https://github.com/llvm/llvm-project/pull/84455
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -302,102 +302,98 @@ void RISCVInstrInfo::copyPhysRegVector(MachineBasicBlock
&MBB,
RISCVII::VLMUL LMul, unsigned NF) const
{
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
- unsigned Opc;
- unsigned SubRegIdx;
- unsigned
@@ -302,102 +302,98 @@ void RISCVInstrInfo::copyPhysRegVector(MachineBasicBlock
&MBB,
RISCVII::VLMUL LMul, unsigned NF) const
{
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
- unsigned Opc;
- unsigned SubRegIdx;
- unsigned
@@ -212,19 +185,13 @@ body: |
; CHECK-NEXT: $v7 = VMV1R_V $v14
; CHECK-NEXT: $v8 = VMV1R_V $v15
; CHECK-NEXT: $v9 = VMV1R_V $v16
-; CHECK-NEXT: $v4 = VMV1R_V $v10
-; CHECK-NEXT: $v5 = VMV1R_V $v11
-; CHECK-NEXT: $v6 = VMV1R_V $v12
-; CHEC
@@ -302,102 +302,98 @@ void RISCVInstrInfo::copyPhysRegVector(MachineBasicBlock
&MBB,
RISCVII::VLMUL LMul, unsigned NF) const
{
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
- unsigned Opc;
- unsigned SubRegIdx;
- unsigned
@@ -302,102 +302,98 @@ void RISCVInstrInfo::copyPhysRegVector(MachineBasicBlock
&MBB,
RISCVII::VLMUL LMul, unsigned NF) const
{
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
- unsigned Opc;
- unsigned SubRegIdx;
- unsigned
@@ -146,16 +127,12 @@ body: |
; CHECK-NEXT: $v7 = VMV1R_V $v12
; CHECK-NEXT: $v8 = VMV1R_V $v13
; CHECK-NEXT: $v9 = VMV1R_V $v14
-; CHECK-NEXT: $v6 = VMV1R_V $v10
-; CHECK-NEXT: $v7 = VMV1R_V $v11
-; CHECK-NEXT: $v8 = VMV1R_V $v12
-; CHEC
@@ -146,16 +127,12 @@ body: |
; CHECK-NEXT: $v7 = VMV1R_V $v12
; CHECK-NEXT: $v8 = VMV1R_V $v13
; CHECK-NEXT: $v9 = VMV1R_V $v14
-; CHECK-NEXT: $v6 = VMV1R_V $v10
-; CHECK-NEXT: $v7 = VMV1R_V $v11
-; CHECK-NEXT: $v8 = VMV1R_V $v12
-; CHEC
@@ -302,102 +302,81 @@ void RISCVInstrInfo::copyPhysRegVector(MachineBasicBlock
&MBB,
RISCVII::VLMUL LMul, unsigned NF) const
{
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
- unsigned Opc;
- unsigned SubRegIdx;
- unsigned
@@ -127,8 +127,21 @@ def XLenRI : RegInfoByHwMode<
[RV32, RV64],
[RegInfo<32,32,32>, RegInfo<64,64,64>]>;
+class RISCVRegisterClass regTypes, int align, dag regList>
+: RegisterClass<"RISCV", regTypes, align, regList> {
+ bit IsVRegClass = 0;
+ i
https://github.com/lukel97 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/84448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -302,102 +302,81 @@ void RISCVInstrInfo::copyPhysRegVector(MachineBasicBlock
&MBB,
RISCVII::VLMUL LMul, unsigned NF) const
{
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
- unsigned Opc;
- unsigned SubRegIdx;
- unsigned
https://github.com/lukel97 commented:
Is this NFC?
https://github.com/llvm/llvm-project/pull/84448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
lukel97 wrote:
Superseded by #83856
https://github.com/llvm/llvm-project/pull/83848
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 closed
https://github.com/llvm/llvm-project/pull/83848
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
lukel97 wrote:
> I think the "Requested by" comes from the git committer.
There's a PR open to fix this: #82680
> @lukel97 i'm not sure if you have already or not, but it might be good to
> include the recent test you added too.
Sure thing, I can't see a way of editing/pushing more commits t
https://github.com/lukel97 milestoned
https://github.com/llvm/llvm-project/pull/80238
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/lukel97 created
https://github.com/llvm/llvm-project/pull/79931
This cherry picks a fix 5cf9f2cd9888feea23a624c1de3cc37ce8ce8112 for a
miscompile (only with the -mrvv-vector-bits=zvl configuration or similar)
introduced in bb8a8770e203ba027d141cd1200e93809ea66c8f, which is p
https://github.com/lukel97 milestoned
https://github.com/llvm/llvm-project/pull/79931
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
Author: Luke Lau
Date: 2023-11-30T15:19:46+08:00
New Revision: c0b926939829d9d4bb6ac5825e62f30960b6ed22
URL:
https://github.com/llvm/llvm-project/commit/c0b926939829d9d4bb6ac5825e62f30960b6ed22
DIFF:
https://github.com/llvm/llvm-project/commit/c0b926939829d9d4bb6ac5825e62f30960b6ed22.diff
LOG:
61 matches
Mail list logo