[RISCV] 'K'-extension ordering
authorTsukasa OI <research_trasio@irq.a4lg.com>
Tue, 10 May 2022 16:25:43 +0000 (00:25 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 10 May 2022 16:52:00 +0000 (00:52 +0800)
commit7fe0630fcb6d52cb63463669c47f4846f7d9ccbf
tree9cbcc46d5f4ce57c5c0ba9d69d0b1d7d8243c350
parent814b60509599614ba767cf0afef119cdbb7c4df8
[RISCV] 'K'-extension ordering

This commit adds 'K' to supported extension list (before 'J').
It makes "Zk*" extensions correctly placed before "Zv*" extensions.

Multi-letter "Z*" extensions are first ordered with the most closely
related alphabetical extension category ("IMAF...").  This is represented
in LLVM as `AllStdExts' variable in `llvm/lib/Support/RISCVISAInfo.cpp'.

However, it did not have 'k' making "Zk*" extensions not correctly ordered.

Reviewed By: kito-cheng

Differential Revision: https://reviews.llvm.org/D124340
llvm/lib/Support/RISCVISAInfo.cpp
llvm/test/MC/RISCV/attribute-arch.s