[llvm] [InstCombine] Fold more 'fcmp' 'select' instrs idioms into 'fabs' (PR #83381)

Joshua Cranmer via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 13:31:21 PDT 2024


================
@@ -0,0 +1,140 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt -mtriple=aarch64-unknown-linux-gnu < %s -passes='sroa' -S > %t.ll
+; RUN: cat %t.ll | FileCheck %s --check-prefix=SROA
+; RUN: opt -mtriple=aarch64-unknown-linux-gnu < %t.ll \
+; RUN:     -passes='simplifycfg,instcombine' -S \
----------------
jcranmer-intel wrote:

Testing multiple passes at once is generally discouraged. The test that I'd expect to see here is just that SROA propagates no-signed-zeros-fp-math to the generated PHI, given that we should have tests for the instcombine select/phi working elsewhere.

https://github.com/llvm/llvm-project/pull/83381


More information about the llvm-commits mailing list