Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
2751 | And also mention that "not" is in practice "xor 1". | |
2764 | The i / 1 - i trick deserves a comment. (Personally, I would have written a function and just called it twice). | |
2766 | I suppose you want to continue here rather than error out. Otherwise you seem to be missing on a valid an optimizable case of xor %value, 1 : i1. |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
2759 | Please avoid i and other single letter variable name and find something meaningful instead. Even operand_id would be better. Also, in general we don't need to have such loop. Instead we should canonicalize commutative operations to have constant always on the same side. |
mlir/lib/Dialect/StandardOps/IR/Ops.cpp | ||
---|---|---|
2759 | (operandId given we use camelCase variables) |
I would make this top-level comment more generic, something like Replace a not of a comparison operation, for example: not(cmp eq A, B) => cmp ne A, B.