[llvm] [AArch64][CostModel] Consider some nxv1 operations as legal (PR #214471)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 03:40:36 PDT 2026


gbossu wrote:

> What do you think to the idea of just removing the `ElementCount::getScalable(1)` band aid altogether?

That's where I want to get eventually. Couple months ago, I remember there were codegen issues for cast/conversion instructions with nxv1 types. I think int extensions/truncs were fine, but fp<->int conversions were not. I'll check if that's alright now. I could just add a PR to the stack.

That being said, I think we'll still want some special handling for nxv1 to account for the cost of masking when instructions can't be safely speculated, e.g. for div and most FP instructions with can trigger faults.



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


More information about the llvm-commits mailing list