[PATCH] D148123: [AArch64][CostModel] Make sext/zext free if folded into a masked load

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 08:14:31 PDT 2023


dmgreen added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll:113
 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction:   %load.nxv16i8 = call <vscale x 16 x i8> @llvm.masked.load.nxv16i8.p0(ptr undef, i32 8, <vscale x 16 x i1> undef, <vscale x 16 x i8> undef)
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction:   %zext.nxv16i8to16 = zext <vscale x 16 x i8> %load.nxv16i8 to <vscale x 16 x i16>
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction:   %zext.nxv16i8to16 = zext <vscale x 16 x i8> %load.nxv16i8 to <vscale x 16 x i16>
 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction:   %load.nxv8i8 = call <vscale x 8 x i8> @llvm.masked.load.nxv8i8.p0(ptr undef, i32 8, <vscale x 8 x i1> undef, <vscale x 8 x i8> undef)
----------------
Do you know why this has gone from 3 to 1, if the Dst type is not legal?  I think I would expect the score to be 2!


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

https://reviews.llvm.org/D148123



More information about the llvm-commits mailing list