[PATCH] D58390: [X86] Don't consider functions ABI compatible for ArgumentPromotion pass if they would legalize 512-bit vectors differently.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 10:02:15 PST 2019


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:3085-3089
+  const X86Subtarget *CallerST =
+      static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Caller));
+  const X86Subtarget *CalleeST =
+      static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Callee));
+  return CallerST->useAVX512Regs() == CalleeST->useAVX512Regs();
----------------
echristo wrote:
> I'm guessing removing the single use local variables is much less readable than having them?
clang-format gave me this

```
  return static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Caller))
             ->useAVX512Regs() ==
         static_cast<const X86Subtarget *>(TM.getSubtargetImpl(*Callee))
             ->useAVX512Regs();
```


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

https://reviews.llvm.org/D58390





More information about the llvm-commits mailing list