[PATCH] D126638: [CGP] Also freeze ctlz/cttz operand when despeculating

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 08:24:11 PDT 2022


nikic added a comment.

In D126638#3570001 <https://reviews.llvm.org/D126638#3570001>, @spatel wrote:

> In D126638#3569452 <https://reviews.llvm.org/D126638#3569452>, @nikic wrote:
>
>> For what input is that? As far as I can tell, AArch64 never uses despeculation, and ARM uses a libcall legalization where it makes no difference. I'm trying this one:
>
> I was experimenting with tests based on the IR in the regression test in this patch, so just changing the frozen value alone after doing the despeculation:
> [...]
> And then sending that through llc with:
> $ llc -o - ctlz.ll -mtriple=aarch64
> $ llc -o - ctlz.ll -mtriple=armv7
>
> I used 'v7' with arm; I do see the libcalls with base 'arm' codegen.

Okay, I see. I don't think adding those tests would be super meaningful, because both aarch64/armv7 disable ctz despeculation via TargetLowering hooks, so I don't think we'd particularly care how the pattern would optimize.


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

https://reviews.llvm.org/D126638



More information about the llvm-commits mailing list