[PATCH] D150482: [AArch64] Don't use tbl lowering if ZExt can be folded into user.

Robert Dazi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 12:06:40 PDT 2023


v01dXYZ added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14657
+    auto SrcWidth = SrcTy->getElementType()->getScalarSizeInBits();
+    if (TTI.getCastInstrCost(I->getOpcode(), DstTy, TruncDstType,
+                             TargetTransformInfo::getCastContextHint(I),
----------------
Sorry the question is dumb but why does it use `TruncType` instead of `DoubleSrcType := SrcType with Element type width multiplied by 2` ?


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:14664
+      DstTy = TruncDstType;
+      DstWidth = TruncDstType->getElementType()->getScalarSizeInBits();
     }
----------------
This assignment is not necessary.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1888
+      // type.
+      if (Op == I || Cast->getSrcTy() == Cast->getSrcTy())
+        SrcTys.push_back(Src);
----------------
There is a typo (I think).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150482



More information about the llvm-commits mailing list