This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Emit Constants, not ScalarExprs, for "immediate"-constrained inlineasm arguments.
AbandonedPublic

Authored by ab on Jun 4 2015, 2:11 PM.

Details

Summary

Same problem as D10045 / PR23517, slightly different solution.

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, I think).

Diff Detail

Event Timeline

ab abandoned this revision.Jun 4 2015, 2:11 PM
ab updated this revision to Diff 27145.
ab retitled this revision from to [CodeGen] Emit Constants, not ScalarExprs, for "immediate"-constrained inlineasm arguments..
ab updated this object.
ab edited the test plan for this revision. (Show Details)
ab added reviewers: dsanders, ahatanak, t.p.northover.
ab added a subscriber: Unknown Object (MLST).

Mechanically added llvm-commits, sorry for the noise!