Commit e5ab2d3
committed
[X86] getIntImmCostInst - recognise i64 ICMP EQ/NE special cases
If the lower 32-bits of a i64 value is known to be zero, then icmp lowering will shift+truncate down to a i32 allowing the immediate to be embedded
There's a lot more that could be done here to match x86 icmp lowering, but this PR just focuses on known regressions.
Fixes #142513
Fixes #621451 parent fd452da commit e5ab2d3
File tree
3 files changed
+17
-16
lines changed- llvm
- lib/Target/X86
- test/CodeGen/X86
3 files changed
+17
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5993 | 5993 | | |
5994 | 5994 | | |
5995 | 5995 | | |
5996 | | - | |
5997 | | - | |
| 5996 | + | |
5998 | 5997 | | |
5999 | 5998 | | |
6000 | 5999 | | |
6001 | 6000 | | |
| 6001 | + | |
| 6002 | + | |
| 6003 | + | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
| 6007 | + | |
| 6008 | + | |
6002 | 6009 | | |
6003 | 6010 | | |
6004 | 6011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
| 19 | + | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | 33 | | |
39 | 34 | | |
| 35 | + | |
40 | 36 | | |
41 | 37 | | |
42 | | - | |
43 | 38 | | |
44 | 39 | | |
45 | 40 | | |
| |||
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
51 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | | - | |
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
| |||
0 commit comments