From 4c2d487fab1f133a919620d4fbed098f1e3323bf Mon Sep 17 00:00:00 2001 From: a39 <573470041@qq.com> Date: Sun, 31 Mar 2024 00:31:24 +0800 Subject: [PATCH] Update FindFCmpEq in README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1bab014..1213b50 100644 --- a/README.md +++ b/README.md @@ -876,7 +876,7 @@ to test **FindFCmpEq**: ```bash export LLVM_DIR= # Generate the input file -$LLVM_DIR/bin/clang -emit-llvm -S -c /inputs/input_for_fcmp_eq.c -o input_for_fcmp_eq.ll +$LLVM_DIR/bin/clang -emit-llvm -S -Xclang -disable-O0-optnone -c /inputs/input_for_fcmp_eq.c -o input_for_fcmp_eq.ll # Run the pass $LLVM_DIR/bin/opt --load-pass-plugin /lib/libFindFCmpEq.so --passes="print" -disable-output input_for_fcmp_eq.ll ``` @@ -885,9 +885,11 @@ You should see the following output which lists the direct floating-point equali ```llvm Floating-point equality comparisons in "sqrt_impl": - %cmp = fcmp oeq double %0, %1 -Floating-point equality comparisons in "compare_fp_values": - %cmp = fcmp oeq double %0, %1 + %11 = fcmp oeq double %9, %10 +Floating-point equality comparisons in "main": + %9 = fcmp oeq double %8, 1.000000e+00 + %13 = fcmp oeq double %11, %12 + %19 = fcmp oeq double %17, %18 ``` ## ConvertFCmpEq