This pattern came up in PR36682 / D44390
https://bugs.llvm.org/show_bug.cgi?id=36682
https://reviews.llvm.org/D44390
https://godbolt.org/g/oKvT5H
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Rebased ontop of updated tests, moved to InstSimplify.
FIXME: should that code be in some other place, in some other function?
Comment Actions
simplifyICmpWithConstant()? I think you'd have to put it above the m_APInt() check in that function in order to still get some of the vector tests with undef elements though.
test/Transforms/InstSimplify/cast-unsigned-icmp-cmp-0.ll | ||
---|---|---|
4 ↗ | (On Diff #138415) | Please remove the datalayout comment. |
8 ↗ | (On Diff #138415) | Remove the 'FIXME' part of this. |
12 ↗ | (On Diff #138415) | This should be "m_Zero does not handle undef elements in vectors." |
Comment Actions
simplifyICmpWithConstant()? I think you'd have to put it above the m_APInt() check in that function in order to still get some of the vector tests with undef elements though.
Yep, thanks, looks less out-of-place there!
The GetCompareTy(RHS) change will be a preparatory NFC commit before the main commit.