diff --git a/src/backend/ir/node.cpp b/src/backend/ir/node.cpp index f1cd38ae..ac017122 100644 --- a/src/backend/ir/node.cpp +++ b/src/backend/ir/node.cpp @@ -53,8 +53,8 @@ namespace rat { } void Node::removeUser(Node* user) { - // remove a single occurrence: each using operand contributes one entry - for(U32 i = 0; i < userCount; ++i) + // remove a single occurrence: each using operand contributes one entry; + for(U32 i = userCount; i-- > 0;) if(users[i] == user) { users[i] = users[--userCount]; return; diff --git a/src/backend/pass/opt/gvn.h b/src/backend/pass/opt/gvn.h index 6ad69a6a..eb8dcd71 100644 --- a/src/backend/pass/opt/gvn.h +++ b/src/backend/pass/opt/gvn.h @@ -38,7 +38,7 @@ namespace rat { hashMix(h, k.type); hashMix(h, (U64)k.payload); hashMix(h, k.in0); - hashMix(h, ((U64)k.in1) << 32); + hashMix(h, k.in1); if(k.sym) hashMix(h, std::hash{}(*k.sym)); return (U64)h;