-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
[CodeGen] x86_64 unable to select X86ISD::VSHLV
/X86ISD::VSRLV
on v32i1
#85681
Comments
@llvm/issue-subscribers-backend-x86 Author: Peter Rong (DataCorrupted)
# Reproduction
https://godbolt.org/z/d4YWMP6cT Same problem with emeraldrapids, sapphirerapids, or znver4. @phoebewang Is this a bug or misuse? If it is a bug, I can help fix it. |
@DataCorrupted
to
Similarly to lshr/ashr https://godbolt.org/z/KcTo3h8cq |
Reduced: define i32 @PR85681(i32 %a0) {
%v0 = bitcast i32 %a0 to <32 x i1>
%s = shl <32 x i1> <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>, %v0
%r = bitcast <32 x i1> %s to i32
ret i32 %r
}
|
`%c = shl <X x i1> %a, %b -> %c = %a` As discussed in llvm#85681, this pattern is added to avoid cannot selection error. Since shift one is either identical or UB, we consider it as identical and replace all uses of %c with %a. Tests for shl, ashr, lshr are added. This fixes llvm#85681. Signed-off-by: Peter Rong <PeterRong96@gmail.com>
…ount is undefined). Alive2: https://alive2.llvm.org/ce/z/SdESbg Fixes llvm#85681
Reproduction
https://godbolt.org/z/d4YWMP6cT
Same problem with emeraldrapids, sapphirerapids, or znver4.
@phoebewang Is this a bug or misuse? If it is a bug, I can help fix it.
The text was updated successfully, but these errors were encountered: