void added a comment.

In D55616#1329301 <https://reviews.llvm.org/D55616#1329301>, @jyknight wrote:

> This seems like a good start, but not complete.
>
> "n" and "i" both should require that their argument is a constant expression. 
> For "n", it actually must be an immediate constant integer, so 
> setRequiresImmediate() should be used there. For "i", you may use an lvalue 
> constant as well. The way we seem to indicate that, today, is with `if 
> (!Info.allowsRegister() && !Info.allowsMemory())`. However the code in that 
> block does not today *require* that the evaluation as a constant 
> succeed...and it should.
>
> It should also only require that the result is an integer when 
> `requiresImmediateConstant()`.
>
> Additionally, the Sema code needs to have the same conditions as the CodeGen 
> code for when a constant expression is required, but it doesn't. (before or 
> after your change).


Have I mentioned how much I *love* inline asm? :-)

I think I've addressed all of your concerns. PTAL.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55616



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to