[PATCH] D24822: [SelectionDAG] Enable division-by-constant optimization for wide types

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 12:38:37 PDT 2016


nhaehnle added inline comments.

================
Comment at: test/CodeGen/BPF/sdiv_error.ll:3
@@ -2,3 +2,3 @@
 ; RUN: FileCheck %s < %t1
-; CHECK: Unsupport signed division
+; CHECK: Cannot select: t27: i64,i64 = smul_lohi
 
----------------
ast wrote:
> 'cannot select' is unreadable to C programmer comparing to 'Unsupported signed div'.
> Usability of BPF is the hardest problem we're facing, so we don't want to lose those error messages. Hence similar to the SDIV error, can you please add the same error for SMUL_LOHI in BPFDAGToDAGISel::Select() ?
> Also keeping the same hint "Please convert to unsigned div/mod".
> Thanks
Hmm, relying on backend error messages for usability is maybe not the best idea...

Not sure how to change this. Perhaps adding an isSigned parameter to isIntDivCheap?


https://reviews.llvm.org/D24822





More information about the llvm-commits mailing list