Commit 3e2f549
Changes to MismatchDetected
MismatchDetect wasn't detecting type size mismatch in this case
```llvm
%0 = alloca [2 x double]
%1 = getelementptr inbounds [2 x double], ptr %0, i64 0, i64 0
%2 = load <2 x i32>, ptr %1
```
As it was comparing number of bits allocated by load instruction type --
<2 x i32> to allocated bits of alloca scalar type -- double, resulting
in not detecting size mismatch as 64 == 64. I've changed approach to
using LLVM API getScalarSizeInBits() type method to compare scalar
sizes, similarily to what was done in typed pointers path (see
SOALayoutChecker::visitBitCastInst). Refactored control flow.1 parent e4b64c1 commit 3e2f549
File tree
2 files changed
+19
-32
lines changed- IGC/Compiler
- CISACodeGen
- tests/PrivateMemoryResolution/SOA_promotion
2 files changed
+19
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | 561 | | |
565 | 562 | | |
566 | 563 | | |
| |||
576 | 573 | | |
577 | 574 | | |
578 | 575 | | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | 576 | | |
587 | 577 | | |
588 | | - | |
589 | 578 | | |
590 | 579 | | |
591 | 580 | | |
592 | | - | |
593 | | - | |
594 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
595 | 587 | | |
| 588 | + | |
596 | 589 | | |
597 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
598 | 595 | | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
| 596 | + | |
| 597 | + | |
617 | 598 | | |
618 | 599 | | |
619 | 600 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
0 commit comments