I only do this for unmasked cases for now because isel is failing to fold the mask. I'll try to fix that soon.
I'll do the same thing for packed add/sub/mul/div in a future patch.
Paths
| Differential D27879
[AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION. ClosedPublic Authored by craig.topper on Dec 17 2016, 10:19 AM.
Details Summary I only do this for unmasked cases for now because isel is failing to fold the mask. I'll try to fix that soon. I'll do the same thing for packed add/sub/mul/div in a future patch.
Diff Detail
Event Timelinecraig.topper retitled this revision from to [AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION.. craig.topper updated this object. Comment Actions Other than a minor comment, LGTM.
Comment Actions I think Simon is right. Nothing will catch the badly formed intrinsic before this. So we should keep a dyn_cast here. Comment Actions Accepting based on Zvi's LGTM and determining that the dyn_cast helps keep the optimization robust against badly formed uses of the intrinsics. This revision is now accepted and ready to land.Dec 25 2016, 5:52 PM Closed by commit rL290535: [AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with… (authored by ctopper). · Explain WhyDec 25 2016, 10:44 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 82491 llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/trunk/test/Transforms/InstCombine/x86-avx512.ll
|