[llvm] [InstCombine] Optimize redundant floating point comparisons in `or`/`and` inst's (PR #158097)
Rajveer Singh Bharadwaj via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 06:04:00 PDT 2025
================
@@ -0,0 +1,134 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -O3 -S | FileCheck %s
+
+define i1 @or_fcmp_redundant_or1(double %v0) {
----------------
Rajveer100 wrote:
So actually earlier this optimisation was in `InstCombine` itself, so the redundant instruction wasn't being removed.
Now after placing it in `InstructionSimplify`, it gets eliminated.
Duplication is not needed now.
https://github.com/llvm/llvm-project/pull/158097
More information about the llvm-commits
mailing list