Commit d718c26
Handle Incorrect Alignment in MergeUniformLoad with Early Return
This commit refactors the `MergeUniformLoad` function in the `ConstantCoalescing` class to handle cases with incorrect alignment, such as structs marked with `__attribute__((packed))`. Assertions have been replaced with an early returns to exit the function when the alignment condition is not met. Only natural alignment is supported.1 parent 547b3b2 commit d718c26
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
| 1056 | + | |
1056 | 1057 | | |
1057 | 1058 | | |
1058 | | - | |
| 1059 | + | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
| |||
1077 | 1078 | | |
1078 | 1079 | | |
1079 | 1080 | | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1083 | 1085 | | |
1084 | 1086 | | |
1085 | 1087 | | |
| |||
0 commit comments