This is an IR expansion pass intended to allow targets to opt-in to using the experimental reduction intrinsics introduced in D30086.
Its purpose is to see the effects of switching to the intrinsics in the IR, so this pass should be added to a target's pass config late, just before codegen. The expansion should result in the same shufflevector sequence form that targets currently expect reductions to be in.
Hello @aemerson ,
Here you set the function shouldExpandReduction to return true.
For below test case:
If I built above case on ppc:, I will get below error:
This is because I use v3i8 here, it's not pow2. But for those ARCH like AArch64, this case can pass, because the function shouldExpandReduction will return false.
I have question that, whether we should fix above error. For example, if the number of element is not pow2, we do not call shouldExpandReduction?