[CGP] refactor optimizeCmpExpression (NFCI)
authorSanjay Patel <spatel@rotateright.com>
Sun, 3 Feb 2019 13:48:03 +0000 (13:48 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 3 Feb 2019 13:48:03 +0000 (13:48 +0000)
commit00fcc74e502a66244dc416c3f12534aedb2612d6
tree232031c5c0e06ba9265531d44b6990f677a2cb39
parent359a97310b101d6a7e946d08c3a3924d5d21a7df
[CGP] refactor optimizeCmpExpression (NFCI)

This is not truly NFC because we are bailing out without
a TLI now. That should not be a real concern though because
there should be a TLI in any real-world scenario.

That seems better than passing around a pointer and then
checking it for null-ness all over the place.

The motivation is to fix what appears to be an unintended
restriction on the uaddo transform -
hasMultipleConditionRegisters() shouldn't be reason to limit
the transform.

llvm-svn: 352988
llvm/lib/CodeGen/CodeGenPrepare.cpp