[PATCH] D38234: [ARM] isTruncateFree fix

Evgeny Astigeevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 15:30:56 PDT 2017


eastig added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:12336
 }
 
 bool ARMTargetLowering::isZExtFree(SDValue Val, EVT VT2) const {
----------------
samparker wrote:
> javed.absar wrote:
> > maybe factor it out as a separate function to avoid code duplication?
> > 
> > bool ARMTargetLowering::isTruncate64To32(unsigned SrcBits, unsigned DstBits) {
> >    return SrcBits == 64 & DstBits == 32);
> > }
> I don't see the value in that here since its a very specific expression.  As far as I can see, all the other backends have a similar approach to this as well.
I agree with Sam I don't see the big value of ARMTargetLowering::isTruncate64To32. 


https://reviews.llvm.org/D38234





More information about the llvm-commits mailing list