]> granicus.if.org Git - llvm/commit
[dfsan] Add explicit zero extensions for shadow parameters in function wrappers.
authorSimon Dardis <simon.dardis@imgtec.com>
Thu, 17 Aug 2017 14:14:25 +0000 (14:14 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Thu, 17 Aug 2017 14:14:25 +0000 (14:14 +0000)
commit987e30d8673d9d1a683ef811e9b7e32d2fadeb8a
treef39716f03fdc9a74b1a9467b882abba0261a9469
parentc3fa9e8b811cde54fe226eee2af6241eedad6fb9
[dfsan] Add explicit zero extensions for shadow parameters in function wrappers.

In the case where dfsan provides a custom wrapper for a function,
shadow parameters are added for each parameter of the function.
These parameters are i16s. For targets which do not consider this
a legal type, the lack of sign extension information would cause
LLVM to generate anyexts around their usage with phi variables
and calling convention logic.

Address this by introducing zero exts for each shadow parameter.

Reviewers: pcc, slthakur

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311087 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
test/Instrumentation/DataFlowSanitizer/Inputs/shadow-args-abilist.txt [new file with mode: 0644]
test/Instrumentation/DataFlowSanitizer/abilist.ll
test/Instrumentation/DataFlowSanitizer/shadow-args-zext.ll [new file with mode: 0644]