Skip to content

Commit 52bd778

Browse files
chapter17: fix idealize_load
1 parent e9de5c4 commit 52bd778

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/sea_of_nodes/nodes/idealize.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,13 @@ impl Load {
558558
if let Some(nnn1) = mproj.inputs(sea)[0].and_then(|i| i.to_new(sea)) {
559559
if let Some(pproj) = ptr.and_then(|p| p.to_proj(sea)) {
560560
if pproj.inputs(sea)[0] == mproj.inputs(sea)[0] {
561-
// return castRO(nnn1.in(nnn1.findAlias(_alias))); // Load from New init
561+
return Some(
562+
self.cast_ro(
563+
nnn1.inputs(sea)[nnn1.find_alias(sea[self].alias, sea)]
564+
.unwrap(),
565+
sea,
566+
),
567+
); // Load from New init
562568
}
563569
}
564570
if !ptr.and_then(|p| p.to_proj(sea)).is_some_and(|pproj| {

0 commit comments

Comments
 (0)