[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2023-11-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2023-11-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2022-11-15 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 --- Comment #5 from Iain Buclaw --- (In reply to Uroš Bizjak from comment #4) > from: > movl%esi, %ecx > movl$1, %eax > sall%cl, %eax > testl %edi, %eax > setne %al > movzbl %al,

[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2022-11-15 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 --- Comment #4 from Uroš Bizjak --- Created attachment 53901 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53901=edit Patch that adds relevant zero_extract patterns This patch adds relevant zero_extract patterns that optimize:

[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2022-11-14 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 --- Comment #3 from Hongtao.liu --- We already have --cut from i386.md 15204;; Help combine recognize bt followed by setc 15205(define_insn_and_split "*bt_setcqi" 15206 [(set (subreg:SWI48 (match_operand:QI 0

[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2022-11-13 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 --- Comment #2 from Iain Buclaw --- Expected generated code would be: --- bt32_setb*: ... shrl$5, %edx movl(%eax,%edx,4), %edx xorl%eax, %eax btl %ecx, %edx setb%al ... --- bt32_setae*: ... shrl$5, %edx

[Bug target/107671] i386: Missed optimization: use of bt in bit test pattern (using -O2 -mtune=core2)

2022-11-13 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107671 --- Comment #1 from Iain Buclaw --- Non-pointer variants also not detected. --- int bt32v_setb(const __UINT32_TYPE__ v, __UINT32_TYPE__ bitnum) { return ((v & (1 << (bitnum & 31 != 0; } int bt64v_setb(const __UINT64_TYPE__ v,