Commit 93f6411
GenerateBlockMemOpsPass: Fix handling geps that don't match load/store result type
Prior to this change, these two geps were handled differently even though they point to the same address.
```llvm
%struct.foo = type { i32, i32, i32 }
; simdBlockWrite was incorrectly generated for this gep
; ptr to the whole struct
%mismatch = getelementptr %struct.foo, ptr addrspace(1) %data, i64 %idx
; but we store to the first field
store i32 0, ptr addrspace(1) %mismatch, align 4
; but here there was no simdBlockWrite generated
; ptr to the first field
%field = getelementptr %struct.foo, ptr addrspace(1) %data, i64 %idx, i32 0
store i32 0, ptr addrspace(1) %field, align 4
```1 parent b42e4d2 commit 93f6411
File tree
3 files changed
+67
-11
lines changed- IGC/Compiler
- CISACodeGen
- tests/GenerateBlockMemOpsPass
3 files changed
+67
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
650 | | - | |
| 650 | + | |
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
719 | | - | |
| 719 | + | |
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
758 | 767 | | |
759 | 768 | | |
760 | | - | |
| 769 | + | |
761 | 770 | | |
762 | 771 | | |
763 | 772 | | |
764 | | - | |
765 | | - | |
766 | | - | |
| 773 | + | |
767 | 774 | | |
768 | 775 | | |
769 | 776 | | |
770 | | - | |
| 777 | + | |
771 | 778 | | |
772 | 779 | | |
773 | 780 | | |
| |||
803 | 810 | | |
804 | 811 | | |
805 | 812 | | |
806 | | - | |
| 813 | + | |
807 | 814 | | |
808 | 815 | | |
809 | 816 | | |
810 | | - | |
| 817 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments