summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/compatibility.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Bitcode/compatibility.ll')
-rw-r--r--llvm/test/Bitcode/compatibility.ll29
1 files changed, 28 insertions, 1 deletions
diff --git a/llvm/test/Bitcode/compatibility.ll b/llvm/test/Bitcode/compatibility.ll
index 8c0471a1134..1d57f759391 100644
--- a/llvm/test/Bitcode/compatibility.ll
+++ b/llvm/test/Bitcode/compatibility.ll
@@ -762,7 +762,27 @@ define void @atomics(i32* %word) {
}
;; Fast Math Flags
-define void @fastmathflags(float %op1, float %op2) {
+define void @fastmathflags_unop(float %op1) {
+ %f.nnan = fneg nnan float %op1
+ ; CHECK: %f.nnan = fneg nnan float %op1
+ %f.ninf = fneg ninf float %op1
+ ; CHECK: %f.ninf = fneg ninf float %op1
+ %f.nsz = fneg nsz float %op1
+ ; CHECK: %f.nsz = fneg nsz float %op1
+ %f.arcp = fneg arcp float %op1
+ ; CHECK: %f.arcp = fneg arcp float %op1
+ %f.contract = fneg contract float %op1
+ ; CHECK: %f.contract = fneg contract float %op1
+ %f.afn = fneg afn float %op1
+ ; CHECK: %f.afn = fneg afn float %op1
+ %f.reassoc = fneg reassoc float %op1
+ ; CHECK: %f.reassoc = fneg reassoc float %op1
+ %f.fast = fneg fast float %op1
+ ; CHECK: %f.fast = fneg fast float %op1
+ ret void
+}
+
+define void @fastmathflags_binops(float %op1, float %op2) {
%f.nnan = fadd nnan float %op1, %op2
; CHECK: %f.nnan = fadd nnan float %op1, %op2
%f.ninf = fadd ninf float %op1, %op2
@@ -997,6 +1017,13 @@ continue:
ret i32 0
}
+; Instructions -- Unary Operations
+define void @instructions.unops(double %op1) {
+ fneg double %op1
+ ; CHECK: fneg double %op1
+ ret void
+}
+
; Instructions -- Binary Operations
define void @instructions.binops(i8 %op1, i8 %op2) {
; nuw x nsw
OpenPOWER on IntegriCloud