diff options
author | Michael Ilseman <milseman@apple.com> | 2012-11-29 21:25:12 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2012-11-29 21:25:12 +0000 |
commit | 4b896dd613b1d85ee1b261ee470cb72fab24c282 (patch) | |
tree | b82cd633db6da677fc430fe61787c0085bbe0937 /lib/VMCore | |
parent | e8832680f8b7a052bd77751d616d41a20d8bacb1 (diff) | |
download | external_llvm-4b896dd613b1d85ee1b261ee470cb72fab24c282.zip external_llvm-4b896dd613b1d85ee1b261ee470cb72fab24c282.tar.gz external_llvm-4b896dd613b1d85ee1b261ee470cb72fab24c282.tar.bz2 |
copyFastMathFlags utility and test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instruction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index d93c1d7..7b73e77 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -177,6 +177,12 @@ FastMathFlags Instruction::getFastMathFlags() const { return cast<FPMathOperator>(this)->getFastMathFlags(); } +/// Copy I's fast-math flags +void Instruction::copyFastMathFlags(const Instruction *I) { + setFastMathFlags(I->getFastMathFlags()); +} + + const char *Instruction::getOpcodeName(unsigned OpCode) { switch (OpCode) { // Terminators |