HomePhabricator

[CodeMetrics] Don't let extends of i1 be free.

Description

[CodeMetrics] Don't let extends of i1 be free.

getUserCost() currently returns TCC_Free for any extend of a compare (i1)
result. It seems this is only true in a limited number of cases where for
example two compares are chained. Even in those types of cases it seems
unlikely that they are generally free, while they may be in some cases.

This patch therefore removes this special handling of cast of i1. No tests
are failing because of this.

If some target want the old behavior, it could override getUserCost().

Review: Hal Finkel, Chandler Carruth, Evgeny Astigeevich, Simon Pilgrim,

Ulrich Weigand

https://reviews.llvm.org/D54742/new/

Details

Committed
jonpaMay 16 2019, 6:26 PM
Differential Revision
D54742: [CodeMetrics] Don't let extends of i1 be free.
Parents
rL360969: Fix broken test case.
Branches
Unknown
Tags
Unknown