]> granicus.if.org Git - clang/commit
[CodeGen][NEON] Emit constants for "immediate" intrinsic arguments.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 4 Jun 2015 01:43:41 +0000 (01:43 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Thu, 4 Jun 2015 01:43:41 +0000 (01:43 +0000)
commitef41dd75173df7a75c01942f398bfd112410254b
treee116d50660e533cf04b5ebf118a51ad8fd489543
parentb7689a0ae46fe89635d6de4c2039bb94a6685377
[CodeGen][NEON] Emit constants for "immediate" intrinsic arguments.

On ARM/AArch64, we currently always use EmitScalarExpr for the immediate
builtin arguments, instead of directly emitting the constant. When the
overflow sanitizer is enabled, this generates overflow intrinsics
instead of constants, breaking assumptions in various places.

Instead, use the knowledge of "immediates" to directly emit a constant:
- teach the tablegen backend to emit the "immediate" modifiers
- use those modifiers in the NEON CodeGen, on ARM and AArch64.

Fixes PR23517.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239002 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
utils/TableGen/NeonEmitter.cpp