diff options
| author | Jeff Law <jlaw@ventanamicro.com> | 2025-11-22 11:33:57 -0700 |
|---|---|---|
| committer | Jeff Law <jlaw@ventanamicro.com> | 2025-11-22 11:37:45 -0700 |
| commit | f73b1b0831fe8f071761cc2c6696d92e258d2b4f (patch) | |
| tree | 514d6908f4cdf82fbc6942b0e24deb72b6a46765 /libjava/classpath/lib/gnu/java/rmi/server/RMIClassLoaderImpl$CacheKey.class | |
| parent | f28f1c519db9eaf9d24ac61dc73a9899bf99ccfc (diff) | |
[PR 122701] Emit fresh reg->reg copy rather than modifying existing insnO
I took an ill-advised short-cut with the recent ext-dce improvement to detect
certain shift pairs as sign/zero extensions. Specifically I was adjusting the
SET_SRC of an object.
Often we can get away with that, but as this case shows it's simply not safe
for RTL. The core issue is the right shift we're modifying into a simple
reg->reg move may have things like CLOBBERs outside the set resulting in
(parallel
(set (dstreg) (srcreg))
(clobber (whatever)))
Even that is often OK as targets which have these kinds of clobbers often need them on their basic moves because those moves often set condition codes. But that's not true for GCN.
On GCN that transformation leads to an unrecognizable insn as seen in the pr.
The fix is pretty simple. Just emit a new move and delete the shift. Of
course we have to be prepared to handle multiple insns once we use
emit_move_insn, but that's not too bad.
PR rtl-optimization/122701
gcc/
* ext-dce.cc (ext_dce_try_optimize_rshift): Emit a fresh reg->reg
copy rather than modifying the existing right shift.
gcc/testsuite/
* gcc.dg/torture/pr122701.c: New test.
Diffstat (limited to 'libjava/classpath/lib/gnu/java/rmi/server/RMIClassLoaderImpl$CacheKey.class')
0 files changed, 0 insertions, 0 deletions
