https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123217
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:34285402005b19f7ac2d069e4f5e161e86318b3b commit r16-6308-g34285402005b19f7ac2d069e4f5e161e86318b3b Author: Jakub Jelinek <[email protected]> Date: Sat Dec 20 11:58:25 2025 +0100 i386: Fix up expansion of 2 keylocker and one user_msr builtin [PR123217] target can be especially at -O0 a MEM, not just a REG, and most of the ix86_expand_builtin spots which use target and can't support MEM destinations deal with it properly, except these 3 spots don't. Fixed thusly, when we change target to a new pseudo, the caller will take care of storing that pseudo into the MEM, and this is the solution other spots with similar requirements use in the function. 2025-12-20 Jakub Jelinek <[email protected]> PR target/123217 * config/i386/i386-expand.cc (ix86_expand_builtin) <case IX86_BUILTIN_ENCODEKEY128U32, case IX86_BUILTIN_ENCODEKEY256U32, case IX86_BUILTIN_URDMSR>: Set target to a new pseudo even if it is non-NULL but doesn't satisfy register_operand predicate. * gcc.target/i386/keylocker-pr123217.c: New test. * gcc.target/i386/user_msr-pr123217.c: New test.
