set div/rem default values to 'expensive' in TargetTransformInfo's cost model
authorSanjay Patel <spatel@rotateright.com>
Wed, 23 Sep 2015 22:28:18 +0000 (22:28 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 23 Sep 2015 22:28:18 +0000 (22:28 +0000)
commitdbd50cefa173b5d2bcfbdb0dd62f3d145d589b44
treedf2076f9798db205dc3ff4f82b65f58d8cc5dafb
parentcdc6a8eab9d54c3b942ecc6eeabd6d4c8fff2ee7
set div/rem default values to 'expensive' in TargetTransformInfo's cost model

...because that's what the cost model was intended to do.

As discussed in D12882, this fix has a temporary unintended consequence for
SimplifyCFG: it causes us to not speculate an fdiv. However, two wrongs make
PR24818 right, and two wrongs make PR24343 act right even though it's really
still wrong.

I intend to correct SimplifyCFG and add to CodeGenPrepare to account for this
cost model change and preserve the righteousness for the bug report cases.

https://llvm.org/bugs/show_bug.cgi?id=24818
https://llvm.org/bugs/show_bug.cgi?id=24343

Differential Revision: http://reviews.llvm.org/D12882

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248439 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfoImpl.h
test/Transforms/SimplifyCFG/speculate-math.ll