[PATCH] D124894: Prefer 32bit and 64bit switch conditions for x86

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 12:51:38 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringBase.cpp:1614
+  EVT OldVT = getValueType(DL, CondType);
+  MVT RegType = getRegisterType(Context, OldVT);
+  unsigned RegWidth = RegType.getSizeInBits();
----------------
MatzeB wrote:
> craig.topper wrote:
> > If we just gave targets control over RegType here would that be enough?
> The callback is used by `CodeGenPrepare` though which deals with llvm IR and rather has `Type*`s than `MVT`s...
Ok could we return ExtType from the target and use ExtType to calculate RegWidth for `if` on 1617?

Realy, I'm wondering why we had to move all of the code into TargetLowering and duplicate Argument attributes checking in X86. Or is there some subtle difference that prevents us from sharing the Argument attribute handling.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124894



More information about the llvm-commits mailing list