[llvm] [InstCombine] Transform (fcmp + fadd + sel) into (fcmp + sel + fadd) (PR #106492)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 08:06:01 PST 2024
================
@@ -0,0 +1,634 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+
+; fcmp OGT + fadd + sel => fcmp OGT + sel => fmaxnum
+
+define float @test_fcmp_ogt_fadd_select_constant(float %in) {
----------------
arsenm wrote:
It depends. If the values are in the same block, and the values in the fcmp are a subset of the values in the use instruction
https://github.com/llvm/llvm-project/pull/106492
More information about the llvm-commits
mailing list