ConstantFoldInstruction: avoid wasted calls to ConstantFoldConstantExpression
authorFiona Glaser <escha@apple.com>
Sun, 13 Mar 2016 05:36:15 +0000 (05:36 +0000)
committerFiona Glaser <escha@apple.com>
Sun, 13 Mar 2016 05:36:15 +0000 (05:36 +0000)
commit2e5c0c2858ca40fdb3cc375955a04ff5a35ee9f6
tree4ff67bb06c85258028930c997f68ecce1f138c86
parent614be596926564664f1e01cfd33372bdbc69c5d8
ConstantFoldInstruction: avoid wasted calls to ConstantFoldConstantExpression

Check to see if all operands are constant before calling simplify on them
so that we don't perform wasted simplifications.

llvm-svn: 263374
llvm/lib/Analysis/ConstantFolding.cpp