Commit 3f85134
Chen Zheng
[PowerPC] implement target hook isProfitableToHoist
On Powerpc fma is faster than fadd + fmul for some types,
(PPCTargetLowering::isFMAFasterThanFMulAndFAdd). we should implement target
hook isProfitableToHoist to prevent simplifyCFGpass from breaking fma
pattern by hoisting fmul to predecessor block.
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D762071 parent f528df8 commit 3f85134
File tree
3 files changed
+36
-2
lines changed- llvm
- lib/Target/PowerPC
- test/Transforms/SimplifyCFG/PowerPC
3 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15385 | 15385 | | |
15386 | 15386 | | |
15387 | 15387 | | |
| 15388 | + | |
| 15389 | + | |
| 15390 | + | |
| 15391 | + | |
| 15392 | + | |
| 15393 | + | |
| 15394 | + | |
| 15395 | + | |
| 15396 | + | |
| 15397 | + | |
| 15398 | + | |
| 15399 | + | |
| 15400 | + | |
| 15401 | + | |
| 15402 | + | |
| 15403 | + | |
| 15404 | + | |
| 15405 | + | |
| 15406 | + | |
| 15407 | + | |
| 15408 | + | |
| 15409 | + | |
| 15410 | + | |
| 15411 | + | |
| 15412 | + | |
| 15413 | + | |
| 15414 | + | |
15388 | 15415 | | |
15389 | 15416 | | |
15390 | 15417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
912 | 918 | | |
913 | 919 | | |
914 | 920 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments