https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71428
Bug ID: 71428 Summary: [7 Regression] wrong code with -Os -fno-tree-forwprop (breaks in the .bswap dump) Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Compiler output: $ x86_64-pc-linux-gnu-gcc -Os -fno-tree-forwprop testcase.c -Wno-psabi $ ./a.out Aborted Diffing 6-branch and trunk assembly output shows: @@ -7,10 +7,10 @@ .LFB0: .cfi_startproc mov dx, WORD PTR [rsp+10] - or WORD PTR [rsp+70], dx mov rax, rdi lea rsi, [rsp+8] mov ecx, 16 + mov WORD PTR [rsp+70], dx rep movsd ret .cfi_endproc The "or" seems to disappear in the .bswap dump in trunk. 6-branch .bswap doesn't perform any transformation, but trunk's one does.