diff --git a/doc/guide/myelin.md b/doc/guide/myelin.md index a75c8707..d90b84af 100644 --- a/doc/guide/myelin.md +++ b/doc/guide/myelin.md @@ -134,9 +134,9 @@ cell f { // size 2336 Finally, the Myelin JIT compiler converts the optimized operations into [assembler code](flowasm.txt) using the selected kernel generators. The code -generated for each function depends the negotiated layout and alignment of the -input and output tensors as well as the features support by the CPU (SSE, AVX, -AVX2, FMA3, AVX512, etc.). +generated for each function depends on the negotiated layout and alignment of +the input and output tensors as well as the features support by the CPU (SSE, +AVX, AVX2, FMA3, AVX512, etc.). ### Computing using network cell instances diff --git a/sling/myelin/express.cc b/sling/myelin/express.cc index 3ed3df5f..127aef88 100644 --- a/sling/myelin/express.cc +++ b/sling/myelin/express.cc @@ -870,6 +870,7 @@ bool Express::AlwaysZero(Var *x) const { case MOV: return AlwaysZero(op->args[0]); case ADD: + return AlwaysZero(op->args[0]) && AlwaysZero(op->args[1]); case SUB: return (AlwaysZero(op->args[0]) && AlwaysZero(op->args[1])) || (AlwaysOne(op->args[0]) && AlwaysOne(op->args[1]));