https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100087
Bug ID: 100087 Summary: Redundant extend with compare against zero for baseline Armv8-M Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- For the following: _Bool eq0(int x) { return x == 0; } with -march=armv8-m.base -O2 we generate: eq0: rsbs r3, r0, #0 adcs r0, r0, r3 uxtb r0, r0 bx lr but the uxtb is redundant.