summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-08-21 17:15:33 +0000
committerCraig Topper <craig.topper@intel.com>2018-08-21 17:15:33 +0000
commitb172b8884ac58dd8ca8f3ab63704c35fc7638458 (patch)
treeaa876fd8d371a038da3b7f8c8252e1fbd2207bec /clang/lib/Frontend/CompilerInvocation.cpp
parent98eb4ae499892bc0d6dc273b37af417d8053098c (diff)
downloadbcm5719-llvm-b172b8884ac58dd8ca8f3ab63704c35fc7638458.tar.gz
bcm5719-llvm-b172b8884ac58dd8ca8f3ab63704c35fc7638458.zip
[BypassSlowDivision] Teach bypass slow division not to interfere with div by constant where constants have been constant hoisted, but not moved from their basic block
DAGCombiner doesn't pay attention to whether constants are opaque before doing the div by constant optimization. So BypassSlowDivision shouldn't introduce control flow that would make DAGCombiner unable to see an opaque constant. This can occur when a div and rem of the same constant are used in the same basic block. it will be hoisted, but not leave the block. Longer term we probably need to look into the X86 immediate cost model used by constant hoisting and maybe not mark div/rem immediates for hoisting at all. This fixes the case from PR38649. Differential Revision: https://reviews.llvm.org/D51000 llvm-svn: 340303
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud