[llvm] [X86][NFC] Reorder the registers to reduce unnecessary iterations (PR #70222)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 19:37:58 PDT 2023
================
@@ -1182,11 +1182,27 @@ namespace X86II {
}
}
+ inline bool isXMMReg(unsigned RegNo) {
+ return (RegNo >= X86::XMM0 && RegNo <= X86::XMM15) ||
----------------
phoebewang wrote:
Add comment to explain the reason, besides, add assert to make sure they are continuous, e.g.,
`assert(X86::XMM15 - X86::XMM0 == 15, "XMM registers are not continuous");`
https://github.com/llvm/llvm-project/pull/70222
More information about the llvm-commits
mailing list