[Bug target/122018] x86 doesn't use BTS bitmanip instruction to both set and test bit
uis9936 at gmail dot com via Gcc-bugs <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122018
uis <uis9936 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #65242|0 |1
is obsolete| |
--- Comment #17 from uis <uis9936 at gmail dot com> ---
Created attachment 65301
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65301&action=edit
i386: include bit test patterns in bts, btc and btr to remove redundant bt
Works on small example code.
void g();
int f(int a, int b) {
bool t = false;
t = (a >> b) & 1;
a = a | (1 << b);
if(!t) {
g();
}
return a;
}