aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorCongzhe Cao <congzhe.cao@@huawei.com>2020-09-02 11:02:58 -0400
committerDanilo C. Grael <dancgr@gmail.com>2020-09-02 11:21:48 -0400
commitec489ae048fd971b22400c61458a5295eeba368a (patch)
treea01dee23ea4404cc988848f7ea18ec9894796f54 /clang/lib/CodeGen/CodeGenModule.cpp
parentb6b63684b19813eda9d1b81a113304e7735f0d5c (diff)
downloadllvm-ec489ae048fd971b22400c61458a5295eeba368a.zip
llvm-ec489ae048fd971b22400c61458a5295eeba368a.tar.gz
llvm-ec489ae048fd971b22400c61458a5295eeba368a.tar.bz2
[IPSCCP] Fix a bug that the "returned" attribute is not cleared when function is optimized to return undef
In IPSCCP when a function is optimized to return undef, it should clear the returned attribute for all its input arguments and its corresponding call sites. The bug is exposed when the value of an input argument of the function is assigned to a physical register and because of the argument having a returned attribute, the value of this physical register will continue to be used as the function return value right after the call instruction returns, even if the value that this register holds may be clobbered during the function call. This potentially results in incorrect values being used afterwards. Reviewed By: jdoerfert, fhahn Differential Revision: https://reviews.llvm.org/D84220
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions