Commit 408659c
authored
[RISCV] Merge GPRPair and GPRF64Pair (llvm#116094)
As suggested by Craig, this tries to merge the two sets of register
classes created in llvm#112983, GPRPair* and GPRF64Pair*.
- I added some explicit annotations to `RISCVInstrInfoD.td` which fixed
the type inference issues I was seeing from tablegen for select
patterns.
- I've had to make the behaviour of `splitValueIntoRegisterParts` and
`joinRegisterPartsIntoValue` cover more cases, because you cannot
bitcast to/from untyped (the bitcast would otherwise have been inserted
automatically by TargetLowering code).
- I apparently didn't need to change `getNumRegisters` again, which
continues to tell me there's a bug in the code for tied inputs. I added
some more test coverage of this case but it didn't seem to help find the
asserts I was finding before - I think the difference is between the
default behaviour for integers which doesn't apply to floats.
- There's still a difference between BuildGPRPair and BuildPairF64 (and
the same for SplitGPRPair and SplitF64). I'm not happy with this, I
think it's quite confusing, as they're very similar, just differing in
whether they give a `untyped` or a `f64`. I haven't really worked out
how the DAGCombiner copes if one meets the other, I know we have some of
this for the f64 variants already, but they're a lot more complex than
the GPRPair variants anyway.1 parent 77bf34c commit 408659c
File tree
6 files changed
+90
-64
lines changed- llvm
- lib/Target/RISCV
- AsmParser
- test/CodeGen/RISCV
6 files changed
+90
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | 500 | | |
507 | 501 | | |
508 | 502 | | |
509 | | - | |
| 503 | + | |
510 | 504 | | |
511 | 505 | | |
512 | 506 | | |
| |||
2405 | 2399 | | |
2406 | 2400 | | |
2407 | 2401 | | |
2408 | | - | |
| 2402 | + | |
2409 | 2403 | | |
2410 | 2404 | | |
2411 | 2405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
965 | | - | |
966 | 961 | | |
967 | | - | |
| 962 | + | |
968 | 963 | | |
969 | 964 | | |
970 | 965 | | |
971 | 966 | | |
972 | 967 | | |
973 | | - | |
974 | | - | |
| 968 | + | |
975 | 969 | | |
976 | 970 | | |
977 | 971 | | |
| |||
982 | 976 | | |
983 | 977 | | |
984 | 978 | | |
985 | | - | |
| 979 | + | |
| 980 | + | |
986 | 981 | | |
987 | 982 | | |
988 | 983 | | |
989 | 984 | | |
990 | 985 | | |
991 | | - | |
992 | | - | |
| 986 | + | |
| 987 | + | |
993 | 988 | | |
994 | 989 | | |
995 | 990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
20507 | 20507 | | |
20508 | 20508 | | |
20509 | 20509 | | |
20510 | | - | |
| 20510 | + | |
20511 | 20511 | | |
20512 | 20512 | | |
20513 | 20513 | | |
| |||
20524 | 20524 | | |
20525 | 20525 | | |
20526 | 20526 | | |
20527 | | - | |
| 20527 | + | |
20528 | 20528 | | |
20529 | 20529 | | |
20530 | 20530 | | |
20531 | 20531 | | |
20532 | 20532 | | |
20533 | 20533 | | |
20534 | | - | |
| 20534 | + | |
20535 | 20535 | | |
20536 | 20536 | | |
20537 | 20537 | | |
| |||
20570 | 20570 | | |
20571 | 20571 | | |
20572 | 20572 | | |
20573 | | - | |
| 20573 | + | |
20574 | 20574 | | |
20575 | 20575 | | |
20576 | 20576 | | |
| |||
20588 | 20588 | | |
20589 | 20589 | | |
20590 | 20590 | | |
20591 | | - | |
| 20591 | + | |
20592 | 20592 | | |
20593 | 20593 | | |
20594 | 20594 | | |
| |||
20752 | 20752 | | |
20753 | 20753 | | |
20754 | 20754 | | |
20755 | | - | |
| 20755 | + | |
20756 | 20756 | | |
20757 | 20757 | | |
20758 | 20758 | | |
| |||
21379 | 21379 | | |
21380 | 21380 | | |
21381 | 21381 | | |
21382 | | - | |
| 21382 | + | |
| 21383 | + | |
| 21384 | + | |
| 21385 | + | |
21383 | 21386 | | |
21384 | | - | |
| 21387 | + | |
21385 | 21388 | | |
| 21389 | + | |
| 21390 | + | |
21386 | 21391 | | |
21387 | | - | |
| 21392 | + | |
| 21393 | + | |
| 21394 | + | |
21388 | 21395 | | |
21389 | 21396 | | |
21390 | 21397 | | |
| |||
21396 | 21403 | | |
21397 | 21404 | | |
21398 | 21405 | | |
21399 | | - | |
| 21406 | + | |
21400 | 21407 | | |
21401 | 21408 | | |
21402 | 21409 | | |
| |||
21465 | 21472 | | |
21466 | 21473 | | |
21467 | 21474 | | |
21468 | | - | |
| 21475 | + | |
| 21476 | + | |
| 21477 | + | |
| 21478 | + | |
21469 | 21479 | | |
21470 | | - | |
| 21480 | + | |
21471 | 21481 | | |
21472 | | - | |
21473 | | - | |
21474 | | - | |
21475 | | - | |
| 21482 | + | |
| 21483 | + | |
| 21484 | + | |
| 21485 | + | |
| 21486 | + | |
| 21487 | + | |
| 21488 | + | |
| 21489 | + | |
| 21490 | + | |
| 21491 | + | |
| 21492 | + | |
21476 | 21493 | | |
21477 | 21494 | | |
21478 | 21495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | | - | |
| 469 | + | |
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
533 | | - | |
534 | | - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | 467 | | |
484 | 468 | | |
485 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
49 | 85 | | |
50 | 86 | | |
51 | 87 | | |
| |||
0 commit comments