Skip to content
Snippets Groups Projects
Commit 7dfbb9f1 authored by Russel Arbore's avatar Russel Arbore
Browse files

whoops

parent 0364edb3
No related branches found
No related tags found
1 merge request!203More rodinia optimization
Pipeline #201915 failed
......@@ -152,9 +152,13 @@ pub fn predication(editor: &mut FunctionEditor, typing: &Vec<TypeID>) {
&& editor.get_constant(cons).is_false()
{
editor.edit(|mut edit| {
let inv = edit.add_node(Node::Unary {
op: UnaryOperator::Not,
input: first,
});
let node = edit.add_node(Node::Binary {
op: BinaryOperator::And,
left: first,
left: inv,
right: third,
});
edit = edit.replace_all_uses(id, node)?;
......@@ -188,9 +192,13 @@ pub fn predication(editor: &mut FunctionEditor, typing: &Vec<TypeID>) {
&& editor.get_constant(cons).is_true()
{
editor.edit(|mut edit| {
let inv = edit.add_node(Node::Unary {
op: UnaryOperator::Not,
input: first,
});
let node = edit.add_node(Node::Binary {
op: BinaryOperator::Or,
left: first,
left: inv,
right: second,
});
edit = edit.replace_all_uses(id, node)?;
......
......@@ -43,7 +43,7 @@ fn bfs<n, m: usize>(graph_nodes: Node[n], source: u32, edges: u32[m]) -> i32[n]
}
@loop2 for i in 0..n {
stop = stop && updated[i];
stop = stop && !updated[i];
if updated[i] {
mask[i] = true;
visited[i] = true;
......
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