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

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 01:13:20 PDT 2016


nhaehnle updated this revision to Diff 72774.
nhaehnle marked an inline comment as done.
nhaehnle added a comment.
Herald added subscribers: dschuff, jfb.

I still think it's pretty misguided to rely on errors from the backend,
given that this would be trivial to catch in the frontend where you have
more context for useful error messages anyway, but whatever.

I'm going to take the isIntDivCheap route because yes, it does have to do
with optimizations: you're relying on no optimizations being applied to
sdiv.


https://reviews.llvm.org/D24822

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/TargetLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64ISelLowering.h
  lib/Target/AMDGPU/SOPInstructions.td
  lib/Target/BPF/BPFISelLowering.cpp
  lib/Target/BPF/BPFISelLowering.h
  lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  lib/Target/WebAssembly/WebAssemblyISelLowering.h
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/AMDGPU/sdiv.ll
  test/CodeGen/AMDGPU/udiv.ll
  test/CodeGen/SPARC/rem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24822.72774.patch
Type: text/x-patch
Size: 16132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160928/705ac60f/attachment.bin>


More information about the llvm-commits mailing list