On 1/27/25 12:48 PM, Vineet Gupta wrote:

On 1/26/25 05:29, Jeff Law wrote:

On 1/24/25 3:12 PM, Vineet Gupta wrote:
RV-Vector FP-INT insns use the rounding mode in FRM register which if
explicitly set for V insn needs, is saved/restored (although from the
psABI CC Spec, it is not clear if it actually a caller-saved or
callee-saved).

Anyhow in the failure case the save/restore were generated by the
Mode Switch pass, but then eliminated by sched1:DCE and Late-Combine.
Fix this by using unspec_volatile variant which won't be eliminated.

This showed up as SPEC2017 527.cam4 runtime aborts in glibc:round_away()
which checks for standard rounding modes and the "leaking" rounding mode
due to the bug happened to be a non-standard RISC-V specific RMM
"Round to Nearest, ties to Max".

This is testsuite clean:
Not sure how it could be clean as I think the test itself is busted ;-)

Sorry for the snafu; I would blame "send the patch out on friday" that bit me.
I used the raw test for debugging and coming up with the fix, but before
integrating the test properly I ran the existing testsuite w/ my patch and made
sure it didn't regress anything, so those test results are for real minus the
new test.
It happens. I had a goof of similar nature trying to get something out the door last week as well :-)




What I wanted to do was use your testcase with Pan's patch to see if
Pan's patch resolved both issues.

Yes it does.


Your compiler patch may still be desirable as well, I really haven't
really evaluated that yet.

FWIW with Pan's rework the need for volatile goes away anyways.

The fixed up test (actually tested for A/B pass/fail) which can be integrated in
Pan's commit can be found below
If you could go ahead and install the test into the testsuite, it'd be appreciated.

Thanks!

jeff

Reply via email to