Commit 2770732
committed
[RISCV][TTI] Fix a costing mistake for truncate/fp_round with LMUL>m1
For a narrowing operation, the work performed scales with the source
LMUL not the destination LMUL. A side effect of the code sharing
with FP_EXTEND was that we used the wrong LMUL when costing the
inserted narrowing operations. For casts which start with a high
LMUL operation, this change makes the cost significantly more
expensive.1 parent d6081bf commit 2770732
File tree
2 files changed
+181
-172
lines changed- llvm
- lib/Target/RISCV
- test/Analysis/CostModel/RISCV
2 files changed
+181
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
1080 | | - | |
1081 | 1080 | | |
1082 | | - | |
| 1081 | + | |
1083 | 1082 | | |
1084 | 1083 | | |
1085 | 1084 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
| 1085 | + | |
| 1086 | + | |
1089 | 1087 | | |
1090 | | - | |
| 1088 | + | |
1091 | 1089 | | |
1092 | | - | |
1093 | | - | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
1094 | 1105 | | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
| 1106 | + | |
1098 | 1107 | | |
1099 | 1108 | | |
1100 | 1109 | | |
| |||
0 commit comments