Open Quuxplusone opened 5 years ago
Bugzilla Link | PR43014 |
Status | REOPENED |
Importance | P enhancement |
Reported by | David Bolvansky (david.bolvansky@gmail.com) |
Reported on | 2019-08-15 14:55:01 -0700 |
Last modified on | 2020-08-08 11:37:11 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | craig.topper@gmail.com, kamleshbhalui@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
can someone confirm it?
This feels sort of specific. It only happens if you mix xor and sub.
__attribute_noinline__ int foo(int x, int y) {
p = x ^ y;
if (p == 0) abort();
return 0;
}
Or
__attribute_noinline__ int foo(int x, int y) {
p = x ^ y;
if (x ^ y == 0) abort();
return 0;
}
We'll generate the code that's expected. Neither gcc, icc, or MSVC optimize the
original code either.
If we were to fix this we should do it for other targets. There's nothing X86
specific here.
Should be fixed after 44b260cb0aab387d85e4d59c16fc7b8866264f5e
Oops I closed the wrong bug