[msan] Fix getOriginForNaryOp.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 29 Nov 2012 14:44:00 +0000 (14:44 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 29 Nov 2012 14:44:00 +0000 (14:44 +0000)
commitb096a9d02f1edc59a06258391fe26d3f6cddda07
treeeedaaf42bbbb897eb8c099c8385c2ed066852a3d
parent35b3df6e31f9aac70fb471d74e39f899dfbd689f
[msan] Fix getOriginForNaryOp.

The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would
pick the 3rd operand origin irrespective of its shadow).

The new version always picks the origin of the rightmost poisoned operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168887 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/MemorySanitizer.cpp