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
Diff Detail
- Repository
- rL LLVM
Event Timeline
Rebased ontop of updated tests, moved to InstSimplify.
FIXME: should that code be in some other place, in some other function?
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 | ||
---|---|---|
3–4 | Please remove the datalayout comment. | |
6 | Remove the 'FIXME' part of this. | |
10 | This should be "m_Zero does not handle undef elements in vectors." |
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.
Please remove the datalayout comment.