[InstSimplify] Reduce code duplication in icmp of binop folds (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 2 Aug 2020 13:45:24 +0000 (15:45 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 2 Aug 2020 13:47:18 +0000 (15:47 +0200)
commita0addbb4ec8c7bf791139699d46b08413c46eed7
tree55125b463f01767639343d011a552933f994c1cf
parent8d1b9505f24aad4015d435cc9f23f77f7ff703f8
[InstSimplify] Reduce code duplication in icmp of binop folds (NFC)

For folds where we check for the binop on both the LHS and RHS,
extract a function that expects it on the LHS and call it with
swapped order.
llvm/lib/Analysis/InstructionSimplify.cpp