[PATCH] D150526: [X86] Add X86FixupVectorConstantsPass to re-fold AVX512 vector load folds as broadcast folds

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 02:04:29 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FixupVectorConstants.cpp:77
+  // anything useful.
+  if (ConstantEntry.isMachineConstantPoolEntry())
+    return nullptr;
----------------
LuoYuanke wrote:
> I'm not quite familar with MachineConstantPoolValue, so I don't understand why we should bail for MachineConstantPoolEntry. What's the difference between MachineConstantPoolValue and Constant?
MachineConstantPoolValue are an abstract class that are difficult to extract any data from as its not supposed to be manipulated. Constant entries however, which X86 nearly always uses, are trivial to work with.
```
class MachineConstantPoolEntry {
public:
  union {
    const Constant *ConstVal;
    MachineConstantPoolValue *MachineCPVal;
  } Val;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150526/new/

https://reviews.llvm.org/D150526



More information about the llvm-commits mailing list