Re: [PATCH V4] RISC-V: Prevent speculative vsetvl insn scheduling

2025-06-04 Thread Jeff Law
On 6/3/25 5:24 PM, Vineet Gupta wrote: So as of tip of tree, even w/o the patch we no longer see the  pattern "beq , 0, .L12 " They are replaced with reg anyways, so the test won't even show issue, even w/o the fix.     beq    a1,a5,.L12     beq    a6,t0,.L12     beq    a7,t3,.L12 I thi

Re: [PATCH V4] RISC-V: Prevent speculative vsetvl insn scheduling

2025-06-03 Thread Vineet Gupta
On 5/21/25 11:07, Jeff Law wrote: > On 5/20/25 4:05 PM, Edwin Lu wrote: >> The instruction scheduler appears to be speculatively hoisting vsetvl >> insns outside of their basic block without checking for data >> dependencies. This resulted in a situation where the following occurs >> >> vs

Re: [PATCH V4] RISC-V: Prevent speculative vsetvl insn scheduling

2025-05-21 Thread Jeff Law
On 5/20/25 4:05 PM, Edwin Lu wrote: The instruction scheduler appears to be speculatively hoisting vsetvl insns outside of their basic block without checking for data dependencies. This resulted in a situation where the following occurs vsetvli a5,a1,e32,m1,tu,ma vle32.v v2,

Re: [PATCH V4] RISC-V: Prevent speculative vsetvl insn scheduling

2025-05-21 Thread Jeff Law
On 5/20/25 4:05 PM, Edwin Lu wrote: The instruction scheduler appears to be speculatively hoisting vsetvl insns outside of their basic block without checking for data dependencies. This resulted in a situation where the following occurs vsetvli a5,a1,e32,m1,tu,ma vle32.v v2,

[PATCH V4] RISC-V: Prevent speculative vsetvl insn scheduling

2025-05-20 Thread Edwin Lu
The instruction scheduler appears to be speculatively hoisting vsetvl insns outside of their basic block without checking for data dependencies. This resulted in a situation where the following occurs vsetvli a5,a1,e32,m1,tu,ma vle32.v v2,0(a0) sub a1,a1,a5 <-- a1 poten