[PATCH] D37516: [ARM] Implement isTruncateFree

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 01:34:57 PDT 2017


SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.
This revision is now accepted and ready to land.

Looks reasonable to me.



================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:12182
 
+bool ARMTargetLowering::isTruncateFree(Type *SrcTy, Type *DstTy) const {
+  if (!SrcTy->isIntegerTy() || !DstTy->isIntegerTy())
----------------
Nit: perhaps a comment why on ARM this is free as well? There's a comment about this in AArch64.


================
Comment at: test/Transforms/SimplifyCFG/ARM/select-trunc-i64.ll:13
+  %add = add nsw i64 %conv1, %conv
+ %cmp = icmp sgt i64 %add, 2147483647
+  br i1 %cmp, label %cond.end7, label %cond.false
----------------
Nit: indent off by 1


https://reviews.llvm.org/D37516





More information about the llvm-commits mailing list