Bug 460356 - s390: Sqrt32Fx4 -- cannot reduce tree
Summary: s390: Sqrt32Fx4 -- cannot reduce tree
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andreas Arnez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 12:12 UTC by Andreas Arnez
Modified: 2023-01-11 19:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch with fixes and test cases (39.04 KB, patch)
2022-12-15 16:32 UTC, Andreas Arnez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Arnez 2022-10-13 12:12:53 UTC
It has been seen that an application running under Valgrind on IBM Z Systems crashes with this message:

    Sqrt32Fx4(And32(Sub32(0x4:I32,t178),0x3:I32),LDbe:V128(t28))
      vex: the `impossible' happened:
         s390_isel_vec_expr: cannot reduce tree
    ...

Looking at the source, it seems that Sqrt32Fx4 is not implemented correctly.
Comment 1 Andreas Arnez 2022-10-17 15:54:00 UTC
Assigning to myself. I have a fix, but before attaching it here, I'd like to finish a test case that covers this.
Comment 2 Andreas Arnez 2022-12-15 16:32:12 UTC
Created attachment 154601 [details]
Patch with fixes and test cases

This patch series includes a fix for this issue. It also fixes the implementation of some other vector floating point instructions:
* VFMA, VFMS, VFNMA, and VFNMS for 128-bit FP (which were unimplemented)
* VFCH and VFCHE (whose implementations were swapped)
* VFMIN and VFMAX (which clobbered the condition code)
Additionally, the series includes a test case that covers all these issues.
Comment 3 Andreas Arnez 2023-01-11 15:51:29 UTC
Pushed all of the above.