alexey-bataev wrote:

> In the current implementation I switched to using OrigVar->getType() to get 
> the variable’s Type. Now getTypeSize() correctly returns 8 bits for char, 16 
> for short, 64 for long, etc. That means code like now rejects, whereas it 
> used to compile.

I think it should be compiled, unless you implement a range check. The type of 
the unrolling factor should not affect the compilation, only the value range.

> One remaining concern: the bit-width check treats all iteration variables as 
> unsigned. It doesn’t account for signed types. Should I add a separate 
> signed-range check, as suggested here in this 
> https://github.com/llvm/llvm-project/issues/139268#issuecomment-2867068205?

Bit-width should not affect compilation, only potential value range

https://github.com/llvm/llvm-project/pull/139986
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to