[InstCombine] move abs transform to helper function; NFC
authorSanjay Patel <spatel@rotateright.com>
Wed, 7 Apr 2021 12:12:38 +0000 (08:12 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 7 Apr 2021 12:35:07 +0000 (08:35 -0400)
commit0333ed8e0c3763e50ec0c43e289967d407c14786
tree196a474e083c8c2e3f287e281eb74b9e77952727
parente571e56ae839e8f672eeb57f60581dac12b0688d
[InstCombine] move abs transform to helper function; NFC

The swap of the operands can affect later transforms that
are expecting a constant as operand 1. I don't think we
can trigger a bug with the current code, but I hit that
problem while drafting a new transform for min/max intrinsics.
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp