[llvm] [SimplifyLibCalls] Constant fold scalbxx (PR #114417)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 11:27:08 PST 2024
================
@@ -0,0 +1,85 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; RUN: opt -S -passes=instsimplify < %s | FileCheck %s
+
+declare double @scalbln(double, i64)
+declare float @scalblnf(float, i64)
+declare x86_fp80 @scalblnl(x86_fp80, i64)
+declare double @scalbn(double, i32)
+declare float @scalbnf(float, i32)
+declare x86_fp80 @scalbnl(x86_fp80, i32)
+
+;---------------------------------------------------------------------
+; scalbn(scalbn(x, a), b) -> scalbn(x, a + b)
+;---------------------------------------------------------------------
+
+define double @scalbln_scalbln(double %x, i64 %a, i64 %b) {
----------------
arsenm wrote:
None of these tests are for constants, and none of these tests will do anything in instsimplify
https://github.com/llvm/llvm-project/pull/114417
More information about the llvm-commits
mailing list