Skip to content
Snippets Groups Projects
Commit c83bc41f authored by rarbore2's avatar rarbore2
Browse files

Merge branch 'cpu_undef' into 'main'

Generate LLVM undef on CPU

See merge request !110
parents ec779c5f 83657b24
No related branches found
No related tags found
1 merge request!110Generate LLVM undef on CPU
Pipeline #201025 passed
...@@ -536,6 +536,17 @@ impl<'a> CPUContext<'a> { ...@@ -536,6 +536,17 @@ impl<'a> CPUContext<'a> {
self.get_value(collect, true) self.get_value(collect, true)
)?; )?;
} }
Node::Undef { ty } => {
let body = &mut blocks.get_mut(&self.bbs.0[id.idx()]).unwrap().body;
let ty = self.get_type(ty);
write!(
body,
" {} = bitcast {} undef to {}\n",
self.get_value(id, false),
ty,
ty
)?;
}
_ => panic!("PANIC: Can't lower {:?}.", self.function.nodes[id.idx()]), _ => panic!("PANIC: Can't lower {:?}.", self.function.nodes[id.idx()]),
} }
Ok(()) Ok(())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment