forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In LLVM FMA3 operands are dst, src1, src2, src3, however dst is not e…
…ncoded as it is always src1. This was causing the encoding of the operands to be off by one. Patch by Chris Bieneman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188866 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; RUN: %lli %s | FileCheck %s | ||
; REQUIRES: fma3 | ||
; CHECK: 12.000000 | ||
|
||
@msg_double = internal global [4 x i8] c"%f\0A\00" | ||
|
||
declare i32 @printf(i8*, ...) | ||
|
||
define i32 @main() { | ||
%fma = tail call double @llvm.fma.f64(double 3.0, double 3.0, double 3.0) nounwind readnone | ||
|
||
%ptr1 = getelementptr [4 x i8]* @msg_double, i32 0, i32 0 | ||
call i32 (i8*,...)* @printf(i8* %ptr1, double %fma) | ||
|
||
ret i32 0 | ||
} | ||
|
||
declare double @llvm.fma.f64(double, double, double) nounwind readnone |