summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/compatibility.ll29
-rw-r--r--llvm/test/Bitcode/function-encoding-rel-operands.ll9
2 files changed, 37 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
diff --git a/llvm/test/Bitcode/function-encoding-rel-operands.ll b/llvm/test/Bitcode/function-encoding-rel-operands.ll
index 1307dd48337..9486e04a0d5 100644
--- a/llvm/test/Bitcode/function-encoding-rel-operands.ll
+++ b/llvm/test/Bitcode/function-encoding-rel-operands.ll
@@ -4,6 +4,15 @@
; RUN: verify-uselistorder < %s
; CHECK: FUNCTION_BLOCK
+; CHECK: INST_UNOP {{.*}}op0=1
+; CHECK: INST_RET {{.*}}op0=1
+define double @test_float_unops(double %a) nounwind {
+ %1 = fneg double %a
+ ret double %1
+}
+
+
+; CHECK: FUNCTION_BLOCK
; CHECK: INST_BINOP {{.*}}op0=1 op1=1
; CHECK: INST_BINOP {{.*}}op0=1 op1=1
; CHECK: INST_BINOP {{.*}}op0=1 op1=1
OpenPOWER on IntegriCloud