joker-eph wrote:

> > This looks like a good fix for the verifier, but we should also fix the 
> > canonicalization to **not** create invalid IR!
> 
> Then I think that I'll implement the suggestions from Matthias in this PR and 
> leave the canonicalization for a future PR. For that future PR, could you 
> tell me what the preferred result would be? What would be the valid IR here 
> that the canonicalization should return?

It is related to this PR in the sense that we can’t create invalid IR: so if 
you make it illegal in the verifier then the canonicalizer can’t fold to this 
form and must check before doing so.
If we want to leave the canonicalizer folding, then the verifier should accept 
it instead.

Both options are correct, but they should be consistent. Not folding negative 
dimension seems like a straightforward thing I think?

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

Reply via email to