[PATCH] D78918: [CostModel] Modify BasicTTI getCastInstrCost

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 11:15:08 PDT 2020


dmgreen added inline comments.


================
Comment at: llvm/test/Analysis/CostModel/ARM/cast.ll:1871
 ; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %b = bitcast float undef to float
-; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %c = bitcast i32 undef to float
-; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %d = bitcast float undef to i32
-; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %e = bitcast i64 undef to double
-; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %f = bitcast double undef to i64
-; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %g = bitcast half undef to i16
-; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %h = bitcast i16 undef to half
+; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %c = bitcast i32 undef to float
+; CHECK-NEON-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %d = bitcast float undef to i32
----------------
These do sound better to me, at least on ARM.


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

https://reviews.llvm.org/D78918





More information about the llvm-commits mailing list