[llvm] [LLVM][Triple] Add an argument to specify canonical form to `Triple::normalize` (PR #122935)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 10:36:34 PST 2025


https://github.com/lenary commented:

I'm so confused by this addition

What if I ask for a 4-tuple, and the code produces a 5-tuple? Right now, i think I get a 5-tuple? It's not clear what the code should do here. This seems like an oversight in working out what you intend.

Are you sure that the items in the 4-/5-tuples are in their correct locations? I'm not sure you can just add `unknown` at the end, but I could be wrong.

I'd like to see a lot more testing with real triples, not totally fake ones. That would probably answer whether the right thing is happening in the latter case with a lot more certainty.

(I'm not sure who the maintainer of this code really is, tbh, but I realise you picked me as I was the last to touch this code - as part of the TargetParser migration. This is reasonable but it means I'm coming at this reasonably "fresh").

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


More information about the llvm-commits mailing list