[llvm] [X86] Add constant comments for VGF2P8AFFINEQB rmbi forms (PR #194789)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 03:32:55 PDT 2026
================
@@ -1944,18 +1960,18 @@ static void addConstantComments(const MachineInstr *MI,
case X86::VGF2P8AFFINEQBZrmi:
case X86::VGF2P8AFFINEQBZ128rmi:
case X86::VGF2P8AFFINEQBZ256rmi: {
- // TODO: Add predicate / broadcast handling with test coverage.
unsigned SrcIdx = getSrcIdx(MI, 1);
- if (auto *C = X86::getConstantFromPool(*MI, SrcIdx + 1)) {
- std::string Comment;
- raw_string_ostream CS(Comment);
- unsigned VectorWidth =
- X86::getVectorRegisterWidth(MI->getDesc().operands()[0]);
- CS << "[";
- printConstant(C, VectorWidth, CS);
- CS << "]";
- OutStreamer.AddComment(CS.str());
- }
+ unsigned VectorWidth =
+ X86::getVectorRegisterWidth(MI->getDesc().operands()[0]);
----------------
RKSimon wrote:
Don't worry about the vector name if it avoid overflow :)
```suggestion
unsigned Width = X86::getVectorRegisterWidth(MI->getDesc().operands()[0]);
```
https://github.com/llvm/llvm-project/pull/194789
More information about the llvm-commits
mailing list