IPO: Swap || operands to avoid dereferencing end()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 17 Aug 2016 01:23:58 +0000 (01:23 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 17 Aug 2016 01:23:58 +0000 (01:23 +0000)
commit9e3edad932cc41be697ac6e38ba0c67ecd22151e
tree21d03cb367573cb5633ca6788230f96a21ec2fef
parent3bcaa812042ba8ffb598c96fae99b07528a0caa5
IPO: Swap || operands to avoid dereferencing end()

IsOperandBundleUse conveniently indicates  whether
std::next(F->arg_begin(),UseIndex) will get to (or past) end().  Check
it first to avoid dereferencing end().

llvm-svn: 278884
llvm/lib/Transforms/IPO/FunctionAttrs.cpp