[llvm] Optimize fptrunc(x)>=C1 --> x>=C2 (PR #99475)
Joshua Cranmer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 11:26:28 PDT 2024
================
@@ -0,0 +1,11 @@
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
+
+
+;CHECK-LABEL: @src(
+;CHECK: %result = fcmp oge double %0, 1.000000e+02
+;CHECK-NEXT: ret i1 %result
+define i1 @src(double %0) {
+ %trunc = fptrunc double %0 to float
+ %result = fcmp oge float %trunc, 1.000000e+02
+ ret i1 %result
+}
----------------
jcranmer-intel wrote:
A test of `fp128`, `x86_fp80`, or `ppc_fp128` in particular would be helpful.
https://github.com/llvm/llvm-project/pull/99475
More information about the llvm-commits
mailing list