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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 10 18:03:30 PST 2018


craig.topper added a comment.

I'm seeing a case where an inline assembly 'n' constraint is behaving differently in -O0 now. Previously we would evaluate the __builtin_constant_p as part of the EvaluateAsInt call in CodeGenFunction::EmitAsmInput, but I think we're not doing that now. This causes us to fail later because the constraint wasn't satisfied since we were in -O0 and thus we didn't optimize the rest of the expression. The test case we have is a nasty mix of __builtin_constant_p, __builtin_choose_expr, and __builtin_classify_type. I can see about sharing it if needed.


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