Emit ASM input in a constant context
authorBill Wendling <isanbard@gmail.com>
Tue, 18 Dec 2018 22:54:03 +0000 (22:54 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 18 Dec 2018 22:54:03 +0000 (22:54 +0000)
commitaa77513bb99775fb44eddea9ace0d45a55aaf802
tree56d5b393aae357dfc3f81b59ad82350eb141c293
parentbb3d3a8f2ed5af0c080970ec8f3bcb39303f6566
Emit ASM input in a constant context

Summary:
Some ASM input constraints (e.g., "i" and "n") require immediate values. At O0,
very few code transformations are performed. So if we cannot resolve to an
immediate when emitting the ASM input we shouldn't delay its processing.

Reviewers: rsmith, efriedma

Reviewed By: efriedma

Subscribers: rehana, efriedma, craig.topper, jyknight, cfe-commits

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

llvm-svn: 349561
clang/lib/Basic/TargetInfo.cpp
clang/lib/CodeGen/CGStmt.cpp
clang/lib/Sema/SemaStmtAsm.cpp
clang/test/CodeGen/builtin-constant-p.c