Commit Graph

2 Commits

Author SHA1 Message Date
Ahmed Bougacha f6a9f0e112 [CodeGen] Don't evaluate immediate inlineasm arguments using isICE().
Instead, just EvaluateAsInt().

Follow-up to r239549: rsmith points out that isICE() is expensive;
seems like it's not the right concept anyway, as it fails on
`static const' in C, and will actually trigger the assert below on:
    test/Sema/inline-asm-validate-x86.c

llvm-svn: 239651
2015-06-13 01:16:10 +00:00
Ahmed Bougacha ff75f3dd6c [CodeGen] Emit Constants for immediate inlineasm arguments.
For inline assembly immediate constraints, we currently always use
EmitScalarExpr, instead of directly emitting the constant. When the
overflow sanitizer is enabled, this generates overflow intrinsics
instead of constants.

Instead, emit a constant for constraints that either require an
immediate (e.g. 'I' on X86), or only accepts constants (immediate
or symbolic; i.e., don't accept registers or memory).

Fixes PR19763.

Differential Revision: http://reviews.llvm.org/D10255

llvm-svn: 239549
2015-06-11 18:19:34 +00:00