aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2020-08-29 12:01:53 -0400
committerSanjay Patel <spatel@rotateright.com>2020-08-29 12:11:01 -0400
commit096527214033772e8d80fdefd8a018b9bfa20021 (patch)
tree9e489eede9b18ddc5534aaf83daf46037948f5f6 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentf90d73eab6e550788634d70ec2ca6391648cb540 (diff)
downloadllvm-096527214033772e8d80fdefd8a018b9bfa20021.zip
llvm-096527214033772e8d80fdefd8a018b9bfa20021.tar.gz
llvm-096527214033772e8d80fdefd8a018b9bfa20021.tar.bz2
[EarlyCSE] fold commutable intrinsics
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 part should be safe too. 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. We may want to remove that next. Follow-up patches should wire up the Instruction::isCommutative() to this IntrinsicInst specialization. That requires updating callers to be aware of the more general commutative property (not just binops). Differential Revision: https://reviews.llvm.org/D86798
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions