diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-08-29 12:01:53 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-08-29 12:11:01 -0400 |
commit | 096527214033772e8d80fdefd8a018b9bfa20021 (patch) | |
tree | 9e489eede9b18ddc5534aaf83daf46037948f5f6 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | f90d73eab6e550788634d70ec2ca6391648cb540 (diff) | |
download | llvm-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