Skip to content
Snippets Groups Projects

Generate LLVM undef on CPU

Merged rarbore2 requested to merge cpu_undef into main
1 file
+ 11
0
Compare changes
  • Side-by-side
  • Inline
+ 11
0
@@ -536,6 +536,17 @@ impl<'a> CPUContext<'a> {
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()]),
}
Ok(())
Loading