[PATCH] D86798: [EarlyCSE] fold commutable intrinsics
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 11:28:15 PDT 2020
spatel created this revision.
spatel added reviewers: nikic, efriedma, lebedev.ri.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.
spatel requested review of this revision.
Handling the new min/max intrinsics is the motivation, but it turns out that we have a bunch of other intrinsics with this missing bit of analysis too.
The FP min/max tests show that we are intersecting FMF, so that should be safe.
As noted in https://llvm.org/PR46897 , there is a commutative property specifier for intrinsics, but no corresponding function attribute, and so apparently no uses of that bit. I can remove that here or independently if this is an adequate or better solution.
https://reviews.llvm.org/D86798
Files:
llvm/include/llvm/IR/IntrinsicInst.h
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/commute.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86798.288653.patch
Type: text/x-patch
Size: 13055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200828/d5ec9f7c/attachment.bin>
More information about the llvm-commits
mailing list