[ARM] Treat cmn immediates as legal in isLegalICmpImmediate.
authorEli Friedman <efriedma@codeaurora.org>
Tue, 10 Jul 2018 23:44:37 +0000 (23:44 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Tue, 10 Jul 2018 23:44:37 +0000 (23:44 +0000)
commitd2c739230ced8e1557c67bc661e91cf807be0a32
tree01cf6ab0825bcd6458e8f4cde0a305a4f7da5744
parenta3c473e650f538a93b66187ac02980dd6ab1ab45
[ARM] Treat cmn immediates as legal in isLegalICmpImmediate.

The original code attempted to do this, but the std::abs() call didn't
actually do anything due to implicit type conversions.  Fix the type
conversions, and perform the correct check for negative immediates.

This probably has very little practical impact, but it's worth fixing
just to avoid confusion in the future, I think.

Differential Revision: https://reviews.llvm.org/D48907

llvm-svn: 336742
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/arm-shrink-wrapping-linux.ll
llvm/test/CodeGen/ARM/sub-cmp-peephole.ll
llvm/test/CodeGen/Thumb2/thumb2-cmp.ll