[all-commits] [llvm/llvm-project] fd5cc4: [SelectionDAG] Fix argument copy elision with irre...
LemonBoy via All-commits
all-commits at lists.llvm.org
Sat May 22 00:43:56 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fd5cc418186ab0fc0650ec373fdf016101eba21d
https://github.com/llvm/llvm-project/commit/fd5cc418186ab0fc0650ec373fdf016101eba21d
Author: LemonBoy <thatlemon at gmail.com>
Date: 2021-05-22 (Sat, 22 May 2021)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/test/CodeGen/X86/arg-copy-elide.ll
Log Message:
-----------
[SelectionDAG] Fix argument copy elision with irregular types
D29668 enabled to avoid a useless copy of the argument value into an alloca if the caller places it in memory (as it often happens on x86) by directly forwarding the pointer to it. This optimization is illegal if the type contains padding bytes: if a truncating store into the alloca is replaced the upper bits are filled with garbage and produce code misbehaving at runtime.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D102153
More information about the All-commits
mailing list