From 0769caf8bbf0bc6ea3c681e5af7d79291fae2e2f Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Fri, 18 Sep 2020 18:14:56 +0200 Subject: implement fneg instruction --- test/Feature/FNeg.ll | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/Feature/FNeg.ll (limited to 'test/Feature') diff --git a/test/Feature/FNeg.ll b/test/Feature/FNeg.ll new file mode 100644 index 00000000..cdea6aaa --- /dev/null +++ b/test/Feature/FNeg.ll @@ -0,0 +1,19 @@ +; REQUIRES: geq-llvm-8.0 +; RUN: %llvmas %s -o %t.bc +; RUN: rm -rf %t.klee-out +; RUN: %klee -exit-on-error -output-dir=%t.klee-out -optimize=false %t.bc + +define i32 @main() { + %1 = fneg double 2.000000e-01 + %2 = fcmp oeq double %1, -2.000000e-01 + br i1 %2, label %success, label %fail + +success: + ret i32 0 + +fail: + call void @abort() + unreachable +} + +declare void @abort() noreturn nounwind -- cgit 1.4.1