9.121 __promise intrinsic

This intrinsic represents a promise you make to the compiler that a given expression always has a nonzero value. This enables the compiler to perform more aggressive optimization when vectorizing code.

Syntax

void __promise(expr)
Where expr is an expression that evaluates to nonzero.

Usage

__promise(expr) is similar but complementary to assert(expr). Unlike assert(expr), __promise(expr) is effective when NDEBUG is defined.
If assertions are enabled (by including assert.h and not defining NDEBUG) then the promise is checked at runtime by evaluating expr as part of assert(expr).
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.