https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18154
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|powerpc-*-* |powerpc*-*-* Status|NEW |WAITING Last reconfirmed|2006-10-22 23:16:26 |2016-1-27 CC| |msebor at gcc dot gnu.org Known to fail| |4.9.3, 5.3.0, 6.0 --- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> --- Current trunk as well as all supported GCC versions before it still emits the same code (see below). XLC 12 on gcc111.fsffrance.org also emits a branch (see below). Ditto for Clang. David, in light of this and in light of comments #4 and #5, do you still believe that GCC should change as you suggested in the Description? .min: # 0x00000000 (H.10.NO_SYMBOL) cmp 0,r3,r4 bc BO_IF,CR0_LT,__L10 oril r3,r4,0x0000 bcr BO_ALWAYS,CR0_LT __L10: # 0x00000010 (H.10.NO_SYMBOL+0x10) bcr BO_ALWAYS,CR0_LT $ cat ~/tmp/t.c && /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -O2 -S -Wall -Wextra -Wpedantic -o/dev/stdout ~/tmp/t.c int min(int a, int b) { if (a < b) return a; else return b; } .file "t.c" .machine power8 .abiversion 2 .section ".toc","aw" .section ".text" .align 2 .p2align 4,,15 .globl min .type min, @function min: cmpw 7,3,4 ble 7,.L2 mr 3,4 .L2: extsw 3,3 blr .long 0 .byte 0,0,0,0,0,0,0,0 .size min,.-min .ident "GCC: (GNU) 6.0.0 20160125 (experimental)" .section .note.GNU-stack,"",@progbits