https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77729
Bug ID: 77729 Summary: aarch64 inserts unneeded uxtb after ldrb, orr ...32 Product: gcc Version: 6.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: j...@jak-linux.org Target Milestone: --- In the attached test case, the aarch64 target inserts a uxtb instruction that is not needed: ldrb w1, [x0] orr w1, w1, 32 uxtb w1, w1 cmp w1, 116 The arm backend handles that just fine: ldrb r3, [r0] @ zero_extendqisi2 orr r3, r3, #32 cmp r3, #116 It also works with 33 or 34 instead of 32 for whatever reasons.