[PATCH] D27028: Add intrinsics for constrained floating point operations

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 14:46:00 PST 2016


craig.topper added a comment.

I don't think llvm_unreachable is guaranteed to do anything in non-asserts build. From the description in the header:

/// Marks that the current location is not supposed to be reachable.
/// In !NDEBUG builds, prints the message and location info to stderr.
/// In NDEBUG builds, becomes an optimizer hint that the current location
/// is not supposed to be reachable.  On compilers that don't support
/// such hints, prints a reduced message instead.
///
/// Use this instead of assert(0).  It conveys intent more clearly and
/// allows compilers to omit some unnecessary code.
#ifndef NDEBUG
#define llvm_unreachable(msg) \

  ::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__)

#elif defined(LLVM_BUILTIN_UNREACHABLE)
#define llvm_unreachable(msg) LLVM_BUILTIN_UNREACHABLE
#else
#define llvm_unreachable(msg) ::llvm::llvm_unreachable_internal()
#endif


Repository:
  rL LLVM

https://reviews.llvm.org/D27028





More information about the llvm-commits mailing list