[llvm] [SROA] Reject illegal vector memset promotion (PR #216772)

Yonah Goldberg via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 02:40:59 PDT 2026


https://github.com/YonahGoldberg requested changes to this pull request.

The code looks all good. My agree it looks like according to the LangRef you can't create a non-integral pointer via `inttoptr`. If the vector gets promoted `memset` is going to require you to convert that splat to the pointer type before inserting, so you're checking that you can actually do that conversion.

Couple issues with the test:
1. I think since this function is basically all dead code it doesn't actually produce `inttoptr` currently. Can you just use the example you gave in the description? I liked that one.
2. I think people prefer for these small tests to automatically generate the test checks. You do that with `llvm/utils/update_test_checks.py`.

Thanks!

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


More information about the llvm-commits mailing list