https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125636

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Eitan from comment #9)
> Created attachment 64650 [details]
> gcc/testsuite/gcc.target/i386/pr125636.c
> 
> Test case for patch

Unpatched GCC already emits:

gcc -O2 -mtune=haswell:

test_zero_extend:
        movzbl  (%rdi), %eax    # 6     [c=9 l=3]  *zero_extendqihi2/0
        ret             # 18    [c=0 l=1]  simple_return_internal

test_sign_extend:
        movzbl  (%rdi), %eax    # 6     [c=9 l=3]  *zero_extendqihi2/0
        ret             # 18    [c=0 l=1]  simple_return_internal

xgcc (GCC) 17.0.0 20260602 (experimental) [master r17-1158-g9fc5a7a25e9]

Same with: GCC: (GNU) 16.1.1 20260515 (Red Hat 16.1.1-2)

Reply via email to