Commit 098d481
committed
[CGP] Fix matching of uadd overflow
This patch fixes the issue where uadd overflow
intrinsic is matched for:
`Add = add A,(uint64_t)-1; Cmp = icmp ne A, 0`
instead of:
`Add = add A,-1; Cmp = icmp ne A, 0`
where -1 is represented in 256 bits.
PR: #626
Signed-off-by: Vladimir Radosavljevic <[email protected]>1 parent 25b4315 commit 098d481
File tree
2 files changed
+12
-10
lines changed- llvm
- lib/CodeGen
- test/CodeGen/EraVM
2 files changed
+12
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1584 | 1584 | | |
1585 | 1585 | | |
1586 | 1586 | | |
1587 | | - | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
1588 | 1590 | | |
1589 | 1591 | | |
1590 | 1592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments