[Bug rtl-optimization/84527] missed optimization for special ternary operation

2018-02-23 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527 Kai Tietz changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug rtl-optimization/84527] missed optimization for special ternary operation

2018-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527 --- Comment #5 from Jakub Jelinek --- No, signed comparison is very different from unsigned comparison, and only unsigned comparison < is usable for this. Borrow flag reflects unsigned signed comparison result rather than signed.

[Bug rtl-optimization/84527] missed optimization for special ternary operation

2018-02-23 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527 --- Comment #4 from Kai Tietz --- (In reply to Jakub Jelinek from comment #3) > ..., but that just means it is not the right code for f1 and f3. Right, that produced code depends on the sign of the condition arguments seems to be pretty wrong

[Bug rtl-optimization/84527] missed optimization for special ternary operation

2018-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug rtl-optimization/84527] missed optimization for special ternary operation

2018-02-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527 --- Comment #2 from Uroš Bizjak --- Try with the unsigned arguments.

[Bug rtl-optimization/84527] missed optimization for special ternary operation

2018-02-23 Thread ktietz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84527 --- Comment #1 from Kai Tietz --- For x86 we produce for sample: movl8(%esp), %eax cmpl%eax, 4(%esp) setge %al movzbl %al, %eax leal-1(%eax,%eax), %eax ret which could be expressed w