- SystemZ appears to have the vnc instruction producing an "and-not" effect. Therefore SystemZIselLowering::hasAndNot can return true.
- This led to different patterns generated for abs which are added here as well.
This change improves SystemZ codegen and will avoid code generation regressions with https://reviews.llvm.org/D109194
Are you sure these are right? Unless I'm missing something, they appear to be swapped:
Looking at the first pattern, if x is positive then the shift value will be 0, therefore the and will be 0, therefore the xor will be a no-op and the return is -x. If x is negative, the shift value will be -1, so the and is a no-op, and the result is -x ^ x ^ -x, which is x. So in summary the pattern matches x >= 0 ? -x : x, which is the *negated* absolute value, while the pattern resolves to lp, which compute the absolute value.
Also, I think these patterns would be more readable if broken up into multiple lines like the other patterns in this group - the indentation shows more easily how the operations are grouped.