On the PR there is discussion of how to more effectively handle this,
but this patch prevents us from miscompiling code.
Details
Diff Detail
- Build Status
Buildable 9928 Build 9928: arc lint + arc unit
Event Timeline
llvm/trunk/lib/Target/X86/X86CmovConversion.cpp | ||
---|---|---|
297 ↗ | (On Diff #113960) | Thanks Chandler for the quick fix.
All other cases has no issue with the CMOV behavior. Do you agree? |
llvm/trunk/lib/Target/X86/X86CmovConversion.cpp | ||
---|---|---|
297 ↗ | (On Diff #113960) | Hmm. Probably, because that's where zext is present. However, aren't those the same conditions in which SUBREG_TO_REG will be introduced? If this is an assertion of zext-ing behavior, it can only show up due to there being zext-ing behavior of cmov itself, and that seems to be the same set of restrictions you outline. Not sure how much more time we should spend on enhanceing the dodge of a miscompile vs. the perhaps more interesting work to handle this case elegantly and effectively. |
llvm/trunk/lib/Target/X86/X86CmovConversion.cpp | ||
---|---|---|
297 ↗ | (On Diff #113960) |
I think you are right, I was thinking about (CMOV16rr + zextTo32), but in such case the zext will not be removed, and we will not see the SUBREG_TO_REG. So, this restriction is good enough.
Sure, I did not mean that we need to spend any more effort immediately. Thinking forward, I want to be sure what more we can do. For now, I think we are fine with this solution, at least till we see a real performance issue. |