Hi all,

In this PR we ICE when expanding the __rbit builtin with a NULL target rtx.
I *think* that only happens when the result is unused and hence maybe we 
shouldn't be expanding
any RTL at all, but the ICE here is easily fixed by deriving the mode from the 
type of the expression
rather than the target.

This patch does that.
Bootstrapped and tested on aarch64-none-linux-gnu.
Pushing to trunk and a GCC 12 version later after some baking time.
Thanks,
Kyrill

gcc/ChangeLog:

        PR target/108140
        * config/aarch64/aarch64-builtins.cc
        (aarch64_expand_builtin_data_intrinsic): Handle NULL target.

gcc/testsuite/ChangeLog:

        PR target/108140
        * gcc.target/aarch64/acle/pr108140.c: New test.

Attachment: rbit-mode.patch
Description: rbit-mode.patch

Reply via email to