]> git.ipfire.org Git - thirdparty/gcc.git/commit
combine: gen_lowpart_no_emit vs CLOBBER [PR120090]
authorAndrew Pinski <quic_apinski@quicinc.com>
Mon, 5 May 2025 16:46:14 +0000 (09:46 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 21 May 2025 22:46:39 +0000 (15:46 -0700)
commitf725d6765373f7884a2ea23bc11409b15545958b
tree59a248000ceb65c78436ae3807e1b0da94fff39d
parent0bed343a2a640c7be4a1970d303098ccf62bd1c6
combine: gen_lowpart_no_emit vs CLOBBER [PR120090]

The problem here is simplify-rtx.cc expects gen_lowpart_no_emit
to return NULL on failure but combine's hook was returning CLOBBER.
After r16-160-ge6f89d78c1a7528e93458278, gcc.target/i386/avx512bw-pr103750-2.c
started to fail at -m32 due to this as new simplify code would return
a RTL with a clobber in it rather than returning NULL.
To fix this gen_lowpart_no_emit should return NULL when there was an failure
instead of a clobber. This only changes the gen_lowpart_no_emit hook and not the
generic gen_lowpart hook as parts of combine just pass gen_lowpart result directly
without checking the return value.

Bootstrapped and tested on x86_64-linux-gnu.

PR rtl-optimization/120090
gcc/ChangeLog:

* combine.cc (gen_lowpart_for_combine_no_emit): New function.
(RTL_HOOKS_GEN_LOWPART_NO_EMIT): Set to gen_lowpart_for_combine_no_emit.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/combine.cc