[PATCH] D49266: [X86][AArch64][DAGCombine] Unfold 'check for [no] signed truncation' pattern

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 15 10:10:05 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:4801-4802
 
+bool X86TargetLowering::shouldTransformSignedTruncationCheck(
+    EVT XVT, unsigned KeptBits) const {
+  // For vectors, we don't have a preference..
----------------
spatel wrote:
> lebedev.ri wrote:
> > spatel wrote:
> > > Any reason this is in the header file for AArch but in the cpp file for x86?
> > That seems to be the way the other hooks are defined - in source for X86, in header for aarch64.
> > What is the preferred way? In headers?
> Hmm...it's a matter of taste where we draw the "too-complex-for-a-header" line. But in this case, I'd prefer that we disregard the target pref and make identical overrides have the same form, so it's clear that there's no difference between these targets. Go with the header version since that's smaller?
OK.


Repository:
  rL LLVM

https://reviews.llvm.org/D49266





More information about the llvm-commits mailing list