[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2021-05-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2020-06-04 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 --- Comment #6 from Segher Boessenkool --- There is also SELECT_CC_MODE.

[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2020-06-04 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 --- Comment #5 from Segher Boessenkool --- Various things can change the comparison mode. simplify_compare_const is the most prominent example (hrm, maybe the only one now?)

[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2020-06-04 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 --- Comment #4 from Uroš Bizjak --- (In reply to Segher Boessenkool from comment #3) > What is the question? 4+4 = 16? Ah, indeed - the question is why combine changes CCCmode compare to CCZmode compare.

[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2020-06-04 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 --- Comment #3 from Segher Boessenkool --- What is the question? 4+4 = 16? Not all costs are included in that "4+4" :-) It does look weird; patches welcome.

[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2020-06-04 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 Uroš Bizjak changed: What|Removed |Added CC||segher at gcc dot gnu.org --- Comment #2

[Bug target/95531] Failure to use TZCNT for __builtin_ffs

2020-06-04 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95531 --- Comment #1 from Uroš Bizjak --- So, what kind of sorcery is this? (insn 2 4 3 2 (set (reg/v:SI 83 [ x ]) (reg:SI 5 di [ x ])) "pr95531.c":2:1 67 {*movsi_internal} (expr_list:REG_DEAD (reg:SI 5 di [ x ]) (nil))) (...)