Commit 4180259
committed
Ensure isInternalPointer can be called for both store nodes
The simplifyBooleanStore method of CFG Simplifier tries to determine
whether two stores in different blocks update the same location based on
a boolean condition. One of the conditions considers whether either
store is storing an internal pointer. However, the code only tested
whether the first of the two stores was indirect before deciding whether
the first child or second child of both stores needed to have its
isInternalPointer flag tested. If the first store was indirect, but the
second was direct, that would result in a non-existent second child of
the second store being accessed. Similarly, if the first store was
direct, but the second was indirect, the first child of the second store
would be accessed, rather than the child representing the value to be
stored.
This change fixes this problem by moving the code that performs these
tests after a test of whether the two stores use the same opcode value.
At that point, the stores must both be direct stores or both be indirect
stores, so the same child index of each will need to have its
isInternalPointer flag tested.
Signed-off-by: Henry Zongaro <[email protected]>1 parent b2a4e64 commit 4180259
1 file changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | 1153 | | |
1164 | 1154 | | |
1165 | 1155 | | |
| |||
1171 | 1161 | | |
1172 | 1162 | | |
1173 | 1163 | | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1174 | 1175 | | |
1175 | 1176 | | |
1176 | 1177 | | |
| |||
0 commit comments