[llvm] [DAG][X86] Improve custom i256/i512 AVX512 CTLZ/CTTZ Handling with MVT::i256/i512 (PR #168860)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 01:59:11 PST 2025


RKSimon wrote:

> > Is there any other work to do when adding new simple types? I see we can expand up to i128 libraries for now, do we need to extend it to i512?

@topperc Might have more experience with this, but I haven't found anything else we need to do now that we have moved to the ValueTypes.td handling - having to manually increment all the type ids is frustrating though.

> Not that I've found so far - but the nvptx regression hints that there might be other code that does a isSimple() test - but it hasn't bit us yet. I'll double check the libcall situation

The i128 libcalls are mainly for win64 arithmetic, and don't have a 256/512 equivalent - we can't safely extend the 128 atomic ops to 256/512 afaict as avx/avx512 don't guarantee their atomicity beyond 128.

There is handling for i128 asm constraints through XMM, but afaict we shouldn't do the same for YMM/ZMM - do you agree?

https://github.com/llvm/llvm-project/pull/168860


More information about the llvm-commits mailing list