[PATCH] D54355: Use is.constant intrinsic for __builtin_constant_p

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 11 10:57:20 PST 2018


jyknight added a comment.

In D54355#1327237 <https://reviews.llvm.org/D54355#1327237>, @craig.topper wrote:

> Here's the test case that we have https://reviews.llvm.org/P8123   gcc seems to accept it at O0


Smaller test case:

  extern unsigned long long __sdt_unsp;
  
  void foo() {
    __asm__ __volatile__(
        "" :: "n"( (__builtin_constant_p(__sdt_unsp) || 0) ? 1 : -1));
  }


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54355/new/

https://reviews.llvm.org/D54355





More information about the cfe-commits mailing list