summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageView.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-09-16 04:35:50 +0000
committerHal Finkel <hfinkel@anl.gov>2014-09-16 04:35:50 +0000
commitcc4f31d3d7ac5307c9efb7b8d764a48d3d6400ee (patch)
treef216d89cb98fc0863ede6f5545a534d3a6f7fb23 /llvm/tools/llvm-cov/SourceCoverageView.cpp
parent2cbc13878f9d29a63879cf2328d6ac484feb5b05 (diff)
downloadbcm5719-llvm-cc4f31d3d7ac5307c9efb7b8d764a48d3d6400ee.tar.gz
bcm5719-llvm-cc4f31d3d7ac5307c9efb7b8d764a48d3d6400ee.zip
Fix BasicTTI::getCmpSelInstrCost to deal with illegal vector types
The default implementation of getCmpSelInstrCost, which provides the cost of icmp/fcmp/select instructions, did not deal sensibly with illegal vector types that were scalarized. We'd ask for the legalization cost of the vector type, which would return something like (4, f64) given an input of <4 x double>, and we'd then check the TLI status of the ISD opcode on that scalar type. This would result in querying (ISD::VSELECT, f64), for example. Amusingly enough, ISD::VSELECT on scalar types is marked as Legal by default (as with most other operations), and most backends never change this because VSELECT is never generated on scalars. However, seeing the resulting operation as Legal, we'd neglect to add the scalarization cost before returning. The result is that we'd grossly under-estimate the cost of cmps/selects on illegal vector types. Now, if type legalization clearly results in scalarization, we skip the early return and add the scalarization cost. llvm-svn: 217859
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud