[PATCH] D147500: [X86][NFC] Compress CD8_Scale from 7 bits to 3 bits
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 22:14:07 PDT 2023
skan marked an inline comment as done.
skan added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:322
(TSFlags & X86II::CD8_Scale_Mask) >> X86II::CD8_Scale_Shift;
+ assert(CD8_Scale >=0 && "Invalid CD8_Scale!");
+ CD8_Scale = CD8_Scale ? static_cast<int>(1U << (CD8_Scale - 1)) : 0;
----------------
craig.topper wrote:
> I'm not sure this assert as any value. Can just use `unsigned`?
Good suggestion! Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147500/new/
https://reviews.llvm.org/D147500
More information about the llvm-commits
mailing list