[Utils] reduce code in createTargetReduction(); NFC
authorSanjay Patel <spatel@rotateright.com>
Tue, 29 Dec 2020 20:53:17 +0000 (15:53 -0500)
committerSanjay Patel <spatel@rotateright.com>
Tue, 29 Dec 2020 20:56:19 +0000 (15:56 -0500)
commit8d18bc8e6db717352811a44a81e76a196530f612
treeedbf245641712642c812847d3b51526cb5153aad
parentdf7ddeea668af7b25ee01f282fd8e6b388155103
[Utils] reduce code in createTargetReduction(); NFC

The switch duplicated the translation in getRecurrenceBinOp().
This code is still weird because it translates to the TTI
ReductionFlags for min/max, but then createSimpleTargetReduction()
converts that back to RecurrenceDescriptor::MinMaxRecurrenceKind.
llvm/lib/Transforms/Utils/LoopUtils.cpp