Add baseline tests for canonicalization of
ssubo X, C -> saddo X, -C.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
It would be good to also have test cases (for the ssubo->saddo canonicalization, not the nsw fold) where the vector constant argument of the ssubo has undef or is non-splat. This is one of those rare cases where we can easily support them, because the necessary machinery is already in place (see https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstCombineCalls.cpp#L2194).
Comment Actions
Additionally we'll also want to test cases where we have i8 -128 on the RHS (with the usual variations, like vector with one element -128 but not others), as we can't do the canonicalization for that case.