[IR] Reimplement FPMathOperator::classof as a whitelist.
authorJay Foad <jay.foad@gmail.com>
Fri, 18 Oct 2019 16:16:36 +0000 (16:16 +0000)
committerJay Foad <jay.foad@gmail.com>
Fri, 18 Oct 2019 16:16:36 +0000 (16:16 +0000)
commita162817a2b7ca0d7bd285a2a3e969a3a652aad57
treecb9babf668efd46b412afb1b8725a4ac493641c5
parentaa3806b47c74c814c9cb6f1de6a5570998b8f011
[IR] Reimplement FPMathOperator::classof as a whitelist.

Summary:
This makes it much easier to verify that the implementation matches the
documentation. It uncovered a bug in the unit tests where we were
accidentally setting fast math flags on a load instruction.

Reviewers: spatel, wristow, arsenm, hfinkel, aemerson, efriedma, cameron.mcinally, mcberg2017, jmolloy

Subscribers: wdng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69176

llvm-svn: 375252
llvm/include/llvm/IR/Operator.h
llvm/unittests/IR/IRBuilderTest.cpp