Skip to content
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

[Hexagon] missed opportunity to use 'tstbit' instruction #42539

Closed
rotateright opened this issue Sep 2, 2019 · 2 comments
Closed

[Hexagon] missed opportunity to use 'tstbit' instruction #42539

rotateright opened this issue Sep 2, 2019 · 2 comments
Assignees
Labels
backend:Hexagon bugzilla Issues migrated from bugzilla

Comments

@rotateright
Copy link
Contributor

Bugzilla Link 43194
Resolution FIXED
Resolved on Sep 04, 2019 08:25
Version trunk
OS All
CC @kparzysz-quic

Extended Description

define i32 @​is_bit_clear(i32 %x) {
%sh = lshr i32 %x, 10
%a = and i32 %sh, 1
%r = xor i32 %a, 1
ret i32 %r
}

$ llc -mtriple=hexagon-- bitclear.ll -o -
is_bit_clear:
{
r0 = and(r0,##1024)
}
{
r0 = cmp.eq(r0,#0)
jumpr r31
}

https://godbolt.org/z/Zht4_4

See also discussion here:
https://reviews.llvm.org/D66687

@rotateright
Copy link
Contributor Author

assigned to @kparzysz-quic

@kparzysz-quic
Copy link

Fixed in https://reviews.llvm.org/rL370913.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:Hexagon bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants