[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs
Alexander Potapenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 24 11:20:50 PDT 2019
glider created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
glider added reviewers: eli.friedman, jyknight.
glider added a subscriber: vitalybuka.
The "=r" output constraint for a structure variable passed to inline asm
shouldn't be converted to "=*r", as this changes the asm directive
semantics and prevents DSE optimizations.
Instead, preserve the constraints and return such structures as integers
of corresponding size, which are converted back to structures when
storing the result.
Fixes PR42672.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D65234
Files:
clang/lib/CodeGen/CGStmt.cpp
clang/test/CodeGen/PR42672.c
clang/test/CodeGen/asm-attrs.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65234.211568.patch
Type: text/x-patch
Size: 4346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190724/738d2e0e/attachment.bin>
More information about the cfe-commits
mailing list