-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang generates worse code than GCC for a simple case #92649
Comments
@llvm/issue-subscribers-backend-x86 Author: Shengchen Kan (KanRobert)
```
int f(int *a) {
if (*a & 1234)
return 0;
return 1;
}
```
|
CC @phoebewang @RKSimon @topperc b/c I'm not if it's by design. |
Maybe similar to #92251 |
I don't think this is intentional. It looks like
The and gets promoted to i32 later due to isTypeDesirableForOp. That creates an anyext load which later becomes a zextload. We could probably add a DAGCombine to promote the load back to i32 for the AND based on alignment. |
https://www.godbolt.org/z/he4cj4a8G
The text was updated successfully, but these errors were encountered: