andykaylor wrote:

> > @jacquesguan I've just posted #174670 to handle the constant folding. Can 
> > you try that with your patch to verify that it handles the 'all ones' case 
> > without the need for extra handling?
> 
> I notice that you have a new pr #174861 to implement the constant folding of 
> castop. I rebase it in my local env, it doesn't fix 'all ones' case. The 
> reason is that we do op fold during cir-canonicalize pass, which is a cir 
> pass after codegen. So we still can't get the all ones constant in codegen.
> 
> One solution might be that we just generate the `andop` with true mask and 
> also fold it in cir-canonicalize. What's your point?

@jacquesguan I reimplemented the folding based on feedback in the review for 
#174670 and in the process split it up into multiple PRs, the last of which has 
not landed yet. The final PR (https://github.com/llvm/llvm-project/pull/175675) 
should fix the all ones case. I observed a change in behavior with an earlier 
builtin handler that was checking for all ones.

https://github.com/llvm/llvm-project/pull/172813
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to