This essentially does the same transform as for SUBC.
Details
Diff Detail
- Build Status
Buildable 4655 Build 4655: arc lint + arc unit
Event Timeline
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
2159 | If i am not mistaken, we don't have a similar LLVM IR transform in InstCombine or InstSimplify. |
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
2144 | I don't think so. | |
2148 | Both codegen result in a sub, the overflow flag goes into the flag register no matter what. I'm not sure what can be done. Add a usubo with a transform that work on a sub and nothing that use the flag and see the transform kicks in ? |
LGTM with one minor to check for vector types.
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
2144 | Please can you add an early out for vectors then, just in case. |
Can vectors ever use this? In which case we need to be careful of generating constants after legalization (see tryFoldToZero).