Skip to content

Conversation

@Sriharika1506
Copy link

Issue : #112631

This patch adds support for constant folding for certain math library functions wherever it was previously missing.

@github-actions
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Nov 28, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Raja Sudha Sri Harika (Sriharika1506)

Changes

Issue : #112631

This patch adds support for constant folding for certain math library functions wherever it was previously missing.


Full diff: https://github.com/llvm/llvm-project/pull/169893.diff

2 Files Affected:

  • (modified) llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h (+3)
  • (modified) llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp (+29)
diff --git a/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
index 4e7c97194cc59..72b8f4b427b3b 100644
--- a/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+++ b/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
@@ -214,6 +214,9 @@ class LibCallSimplifier {
   Value *optimizeSymmetric(CallInst *CI, LibFunc Func, IRBuilderBase &B);
   Value *optimizeRemquo(CallInst *CI, IRBuilderBase &B);
   Value *optimizeFdim(CallInst *CI, IRBuilderBase &B);
+
+  Value *foldLdexp(CallInst *CI, IRBuilderBase &B);
+  
   // Wrapper for all floating point library call optimizations
   Value *optimizeFloatingPointLibCall(CallInst *CI, LibFunc Func,
                                       IRBuilderBase &B);
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index 4a1565977b91c..7508048d3032e 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -2464,6 +2464,24 @@ Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilderBase &B) {
   return nullptr;
 }
 
+Value *LibCallSimplifier::foldLdexp(CallInst *CI,IRBuilderBase &B) {
+
+  Type*RequiredType = CI->getType();
+  if(!RequiredType->isFPOrFPVectorTy())
+    return nullptr;
+
+  Value*x = CI->getArgOperand(0); 
+  Value*exp = CI->getArgOperand(1);
+  Module*M = CI->getModule();
+
+  Function*ldexpDecl = llvm::Intrinsic::getOrInsertDeclaration(M, Intrinsic::ldexp,{RequiredType, exp->getType()});
+  
+  CallInst *NewCall = B.CreateCall(ldexpDecl, {x, exp}, CI->getName());
+  NewCall->setAttributes(CI->getAttributes());
+  return copyFlags(*CI, NewCall);
+}
+
+
 Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilderBase &B) {
   Module *M = CI->getModule();
   Function *Callee = CI->getCalledFunction();
@@ -4031,6 +4049,17 @@ Value *LibCallSimplifier::optimizeFloatingPointLibCall(CallInst *CI,
   case LibFunc_exp2:
   case LibFunc_exp2f:
     return optimizeExp2(CI, Builder);
+  // New ldexp / scalbn / scalbln family:
+  case LibFunc_ldexp:
+  case LibFunc_ldexpf:
+  case LibFunc_ldexpl:
+  case LibFunc_scalbn:
+  case LibFunc_scalbnf:
+  case LibFunc_scalbnl:
+  case LibFunc_scalbln:
+  case LibFunc_scalblnf:
+  case LibFunc_scalblnl:
+    return foldLdexp(CI, Builder);
   case LibFunc_fabsf:
   case LibFunc_fabs:
   case LibFunc_fabsl:

@Sriharika1506 Sriharika1506 marked this pull request as draft November 28, 2025 10:19
@Sriharika1506 Sriharika1506 marked this pull request as ready for review November 28, 2025 10:23
@Sriharika1506
Copy link
Author

@ashwinagrl @YogeshFebyani also worked on this

@Sriharika1506
Copy link
Author

@dtcxzyw

@fawdlstty
Copy link
Contributor

Consider referencing PR #114417 and adding corresponding tests

@dtcxzyw dtcxzyw requested a review from arsenm November 28, 2025 13:18
@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp --diff_from_common_commit

⚠️
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing origin/main to the base branch/commit you want to compare against.
⚠️

View the diff from clang-format here.
diff --git a/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
index 72b8f4b42..67d6bb133 100644
--- a/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+++ b/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
@@ -216,7 +216,7 @@ private:
   Value *optimizeFdim(CallInst *CI, IRBuilderBase &B);
 
   Value *foldLdexp(CallInst *CI, IRBuilderBase &B);
-  
+
   // Wrapper for all floating point library call optimizations
   Value *optimizeFloatingPointLibCall(CallInst *CI, LibFunc Func,
                                       IRBuilderBase &B);
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index 702705ec0..809af8d3f 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -2469,24 +2469,24 @@ Value *LibCallSimplifier::optimizePow(CallInst *Pow, IRBuilderBase &B) {
   return nullptr;
 }
 
-Value *LibCallSimplifier::foldLdexp(CallInst *CI,IRBuilderBase &B) {
+Value *LibCallSimplifier::foldLdexp(CallInst *CI, IRBuilderBase &B) {
 
-  Type*RequiredType = CI->getType();
-  if(!RequiredType->isFPOrFPVectorTy())
+  Type *RequiredType = CI->getType();
+  if (!RequiredType->isFPOrFPVectorTy())
     return nullptr;
 
-  Value*x = CI->getArgOperand(0); 
-  Value*exp = CI->getArgOperand(1);
-  Module*M = CI->getModule();
+  Value *x = CI->getArgOperand(0);
+  Value *exp = CI->getArgOperand(1);
+  Module *M = CI->getModule();
+
+  Function *ldexpDecl = llvm::Intrinsic::getOrInsertDeclaration(
+      M, Intrinsic::ldexp, {RequiredType, exp->getType()});
 
-  Function*ldexpDecl = llvm::Intrinsic::getOrInsertDeclaration(M, Intrinsic::ldexp,{RequiredType, exp->getType()});
-  
   CallInst *NewCall = B.CreateCall(ldexpDecl, {x, exp}, CI->getName());
   NewCall->setAttributes(CI->getAttributes());
   return copyFlags(*CI, NewCall);
 }
 
-
 Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilderBase &B) {
   Module *M = CI->getModule();
   Function *Callee = CI->getCalledFunction();

Copy link
Member

@dtcxzyw dtcxzyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest modifying the code based on https://github.com/llvm/llvm-project/pull/114417/files and fixing previous comments.

I am a bit confused that you are fixing an issue that was assigned to @ashwinagrl. Have you two communicated with each other?

@Sriharika1506
Copy link
Author

@dtcxzyw We are working in a team along with @ashwinagrl.

@github-actions
Copy link

🐧 Linux x64 Test Results

  • 166432 tests passed
  • 2870 tests skipped
  • 6 tests failed

Failed Tests

(click on a test name to see its output)

LLVM

LLVM.Transforms/InstCombine/RISCV/libcall-arg-exts.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll -passes=instcombine -S -mtriple=riscv64 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=instcombine -S -mtriple=riscv64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll:13:10: error: CHECK: expected string not found in input
# | ; CHECK: call double @ldexp
# |          ^
# | <stdin>:20:20: note: scanning from here
# | define double @fun1(i32 %x) {
# |                    ^
# | <stdin>:21:12: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x)
# |            ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll:21:10: error: CHECK: expected string not found in input
# | ; CHECK: call float @ldexpf
# |          ^
# | <stdin>:25:19: note: scanning from here
# | define float @fun2(i32 %x) {
# |                   ^
# | <stdin>:26:13: note: possible intended match here
# |  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll:29:10: error: CHECK: expected string not found in input
# | ; CHECK: call fp128 @ldexpl
# |          ^
# | <stdin>:30:19: note: scanning from here
# | define fp128 @fun3(i8 zeroext %x) {
# |                   ^
# | <stdin>:32:13: note: possible intended match here
# |  %ldexpl1 = call fp128 @llvm.ldexp.f128.i32(fp128 0xL00000000000000003FFF000000000000, i32 %1)
# |             ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/RISCV/libcall-arg-exts.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            15:  
# |            16: declare float @exp2f(float) 
# |            17:  
# |            18: declare fp128 @exp2l(fp128) 
# |            19:  
# |            20: define double @fun1(i32 %x) { 
# | check:13'0                        X~~~~~~~~~~ error: no match found
# |            21:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x) 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:13'1                ?                                                             possible intended match
# |            22:  ret double %ldexp1 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~
# |            23: } 
# | check:13'0     ~~
# |            24:  
# | check:13'0     ~
# |            25: define float @fun2(i32 %x) { 
# | check:13'0     ~~~~~~~~~~~~~~~~~~
# | check:21'0                       X~~~~~~~~~~ error: no match found
# |            26:  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:21'1                 ?                                                           possible intended match
# |            27:  ret float %ldexpf1 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~
# |            28: } 
# | check:21'0     ~~
# |            29:  
# | check:21'0     ~
# |            30: define fp128 @fun3(i8 zeroext %x) { 
# | check:21'0     ~~~~~~~~~~~~~~~~~~
# | check:29'0                       X~~~~~~~~~~~~~~~~~ error: no match found
# |            31:  %1 = zext i8 %x to i32 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |            32:  %ldexpl1 = call fp128 @llvm.ldexp.f128.i32(fp128 0xL00000000000000003FFF000000000000, i32 %1) 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:29'1                 ?                                                                                   possible intended match
# |            33:  ret fp128 %ldexpl1 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~
# |            34: } 
# | check:29'0     ~~
# |            35:  
# | check:29'0     ~
# |            36: declare ptr @__memccpy_chk(ptr, ptr, i32, i64, i64) 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            37:  
# | check:29'0     ~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.Transforms/InstCombine/SystemZ/libcall-arg-exts.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll -passes=instcombine -S -mtriple=systemz-unknown | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=instcombine -S -mtriple=systemz-unknown
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll:13:10: error: CHECK: expected string not found in input
# | ; CHECK: call double @ldexp
# |          ^
# | <stdin>:20:20: note: scanning from here
# | define double @fun1(i32 %x) {
# |                    ^
# | <stdin>:21:12: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x)
# |            ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll:21:10: error: CHECK: expected string not found in input
# | ; CHECK: call float @ldexpf
# |          ^
# | <stdin>:25:19: note: scanning from here
# | define float @fun2(i32 %x) {
# |                   ^
# | <stdin>:26:13: note: possible intended match here
# |  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll:29:10: error: CHECK: expected string not found in input
# | ; CHECK: call fp128 @ldexpl
# |          ^
# | <stdin>:30:19: note: scanning from here
# | define fp128 @fun3(i8 zeroext %x) {
# |                   ^
# | <stdin>:32:13: note: possible intended match here
# |  %ldexpl1 = call fp128 @llvm.ldexp.f128.i32(fp128 0xL00000000000000003FFF000000000000, i32 %1)
# |             ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/SystemZ/libcall-arg-exts.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            15:  
# |            16: declare float @exp2f(float) 
# |            17:  
# |            18: declare fp128 @exp2l(fp128) 
# |            19:  
# |            20: define double @fun1(i32 %x) { 
# | check:13'0                        X~~~~~~~~~~ error: no match found
# |            21:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x) 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:13'1                ?                                                             possible intended match
# |            22:  ret double %ldexp1 
# | check:13'0     ~~~~~~~~~~~~~~~~~~~~
# |            23: } 
# | check:13'0     ~~
# |            24:  
# | check:13'0     ~
# |            25: define float @fun2(i32 %x) { 
# | check:13'0     ~~~~~~~~~~~~~~~~~~
# | check:21'0                       X~~~~~~~~~~ error: no match found
# |            26:  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:21'1                 ?                                                           possible intended match
# |            27:  ret float %ldexpf1 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~
# |            28: } 
# | check:21'0     ~~
# |            29:  
# | check:21'0     ~
# |            30: define fp128 @fun3(i8 zeroext %x) { 
# | check:21'0     ~~~~~~~~~~~~~~~~~~
# | check:29'0                       X~~~~~~~~~~~~~~~~~ error: no match found
# |            31:  %1 = zext i8 %x to i32 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |            32:  %ldexpl1 = call fp128 @llvm.ldexp.f128.i32(fp128 0xL00000000000000003FFF000000000000, i32 %1) 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:29'1                 ?                                                                                   possible intended match
# |            33:  ret fp128 %ldexpl1 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~
# |            34: } 
# | check:29'0     ~~
# |            35:  
# | check:29'0     ~
# |            36: declare ptr @__memccpy_chk(ptr, ptr, i32, i64, i64) 
# | check:29'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            37:  
# | check:29'0     ~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.Transforms/InstCombine/exp2-1.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll -passes=instcombine -S -mtriple=unknown | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll -check-prefixes=LDEXP32
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=instcombine -S -mtriple=unknown
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll -check-prefixes=LDEXP32
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:24:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:21:31: note: scanning from here
# | define double @test_simplify1(i32 %x) {
# |                               ^
# | <stdin>:22:8: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x)
# |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:49:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:27:25: note: scanning from here
# |  %1 = sext i16 %x to i32
# |                         ^
# | <stdin>:27:25: note: with "TMP1" equal to "%1"
# |  %1 = sext i16 %x to i32
# |                         ^
# | <stdin>:28:10: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1)
# |          ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:74:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:33:24: note: scanning from here
# |  %1 = sext i8 %x to i32
# |                        ^
# | <stdin>:33:24: note: with "TMP1" equal to "%1"
# |  %1 = sext i8 %x to i32
# |                        ^
# | <stdin>:34:10: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1)
# |          ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:99:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXPF:%.*]] = call float @ldexpf(float 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:38:30: note: scanning from here
# | define float @test_simplify4(i32 %x) {
# |                              ^
# | <stdin>:39:8: note: possible intended match here
# |  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:153:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:50:25: note: scanning from here
# |  %1 = zext i16 %x to i32
# |                         ^
# | <stdin>:50:25: note: with "TMP1" equal to "%1"
# |  %1 = zext i16 %x to i32
# |                         ^
# | <stdin>:51:10: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1)
# |          ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:179:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:56:24: note: scanning from here
# |  %1 = zext i8 %x to i32
# |                        ^
# | <stdin>:56:24: note: with "TMP1" equal to "%1"
# |  %1 = zext i8 %x to i32
# |                        ^
# | <stdin>:57:10: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1)
# |          ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:205:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXPF:%.*]] = call float @ldexpf(float 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:62:24: note: scanning from here
# |  %1 = zext i8 %x to i32
# |                        ^
# | <stdin>:62:24: note: with "TMP1" equal to "%1"
# |  %1 = zext i8 %x to i32
# |                        ^
# | <stdin>:63:11: note: possible intended match here
# |  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %1)
# |           ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:337:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:91:49: note: scanning from here
# | define double @test_readonly_exp2_f64_of_sitofp(i32 %x) {
# |                                                 ^
# | <stdin>:92:8: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x)
# |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:361:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXPF:%.*]] = call float @ldexpf(float 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:96:49: note: scanning from here
# | define float @test_readonly_exp2f_f32_of_sitofp(i32 %x) {
# |                                                 ^
# | <stdin>:97:8: note: possible intended match here
# |  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:386:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXPL:%.*]] = call fp128 @ldexpl(fp128 0xL00000000000000003FFF000000000000, i32 [[X:%.*]])
# |                 ^
# | <stdin>:101:51: note: scanning from here
# | define fp128 @test_readonly_exp2l_fp128_of_sitofp(i32 %x) {
# |                                                   ^
# | <stdin>:102:11: note: possible intended match here
# |  %ldexpl1 = call fp128 @llvm.ldexp.f128.i32(fp128 0xL00000000000000003FFF000000000000, i32 %x)
# |           ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll:406:17: error: LDEXP32-NEXT: expected string not found in input
# | ; LDEXP32-NEXT: [[LDEXPF:%.*]] = call nnan ninf float @ldexpf(float 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:106:55: note: scanning from here
# | define float @test_readonly_exp2f_f32_of_sitofp_flags(i32 %x) {
# |                                                       ^
# | <stdin>:107:5: note: possible intended match here
# |  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/exp2-1.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            16: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) 
# |            17: declare <2 x float> @llvm.exp2.v2f32(<2 x float>) #0 
# |            18:  
# |            19: declare fp128 @exp2l(fp128) 
# |            20:  
# |            21: define double @test_simplify1(i32 %x) { 
# | next:24'0                                    X~~~~~~~~~ error: no match found
# |            22:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x) 
# | next:24'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:24'1             ?                                                                 possible intended match
# |            23:  ret double %ldexp1 
# | next:24'0      ~~~~~~~~~~~~~~~~~~~~
# |            24: } 
# | next:24'0      ~~
# |            25:  
# | next:24'0      ~
# |            26: define double @test_simplify2(i16 signext %x) { 
# | next:24'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            27:  %1 = sext i16 %x to i32 
# | next:49'0                              X error: no match found
# | next:49'1                                with "TMP1" equal to "%1"
# |            28:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1) 
# | next:49'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:49'2               ?                                                               possible intended match
# |            29:  ret double %ldexp1 
# | next:49'0      ~~~~~~~~~~~~~~~~~~~~
# |            30: } 
# | next:49'0      ~~
# |            31:  
# | next:49'0      ~
# |            32: define double @test_simplify3(i8 signext %x) { 
# | next:49'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            33:  %1 = sext i8 %x to i32 
# | next:74'0                             X error: no match found
# | next:74'1                               with "TMP1" equal to "%1"
# |            34:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1) 
# | next:74'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:74'2               ?                                                               possible intended match
# |            35:  ret double %ldexp1 
# | next:74'0      ~~~~~~~~~~~~~~~~~~~~
# |            36: } 
# | next:74'0      ~~
# |            37:  
# | next:74'0      ~
# |            38: define float @test_simplify4(i32 %x) { 
# | next:74'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:99'0                                   X~~~~~~~~~ error: no match found
# |            39:  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | next:99'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:99'1             ?                                                                possible intended match
# |            40:  ret float %ldexpf1 
# | next:99'0      ~~~~~~~~~~~~~~~~~~~~
# |            41: } 
# | next:99'0      ~~
# |            42:  
# | next:99'0      ~
# |            43: define double @test_no_simplify1(i32 %x) { 
# | next:99'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            44:  %conv = uitofp i32 %x to double 
# |            45:  %ret = call double @exp2(double %conv) 
# |            46:  ret double %ret 
# |            47: } 
# |            48:  
# |            49: define double @test_simplify6(i16 zeroext %x) { 
# |            50:  %1 = zext i16 %x to i32 
# | next:153'0                             X error: no match found
# | next:153'1                               with "TMP1" equal to "%1"
# |            51:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1) 
# | next:153'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:153'2              ?                                                               possible intended match
# |            52:  ret double %ldexp1 
# | next:153'0     ~~~~~~~~~~~~~~~~~~~~
# |            53: } 
# | next:153'0     ~~
# |            54:  
# | next:153'0     ~
# |            55: define double @test_simplify7(i8 zeroext %x) { 
# | next:153'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            56:  %1 = zext i8 %x to i32 
# | next:179'0                            X error: no match found
# | next:179'1                              with "TMP1" equal to "%1"
# |            57:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1) 
# | next:179'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:179'2              ?                                                               possible intended match
# |            58:  ret double %ldexp1 
# | next:179'0     ~~~~~~~~~~~~~~~~~~~~
# |            59: } 
# | next:179'0     ~~
# |            60:  
# | next:179'0     ~
# |            61: define float @test_simplify8(i8 zeroext %x) { 
# | next:179'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            62:  %1 = zext i8 %x to i32 
# | next:205'0                            X error: no match found
# | next:205'1                              with "TMP1" equal to "%1"
# |            63:  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %1) 
# | next:205'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:205'2               ?                                                             possible intended match
# |            64:  ret float %ldexpf1 
# | next:205'0     ~~~~~~~~~~~~~~~~~~~~
# |            65: } 
# | next:205'0     ~~
# |            66:  
# | next:205'0     ~
# |            67: define double @test_simplify9(i8 zeroext %x) { 
# | next:205'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            68:  %1 = zext i8 %x to i32 
# |             .
# |             .
# |             .
# |            86:  %1 = sext <2 x i8> %x to <2 x i32> 
# |            87:  %r = call nnan <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float> splat (float 1.000000e+00), <2 x i32> %1) 
# |            88:  ret <2 x float> %r 
# |            89: } 
# |            90:  
# |            91: define double @test_readonly_exp2_f64_of_sitofp(i32 %x) { 
# | next:337'0                                                     X~~~~~~~~~ error: no match found
# |            92:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x) 
# | next:337'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:337'1            ?                                                                 possible intended match
# |            93:  ret double %ldexp1 
# | next:337'0     ~~~~~~~~~~~~~~~~~~~~
# |            94: } 
# | next:337'0     ~~
# |            95:  
# | next:337'0     ~
# |            96: define float @test_readonly_exp2f_f32_of_sitofp(i32 %x) { 
# | next:337'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:361'0                                                     X~~~~~~~~~ error: no match found
# |            97:  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | next:361'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:361'1            ?                                                                possible intended match
# |            98:  ret float %ldexpf1 
# | next:361'0     ~~~~~~~~~~~~~~~~~~~~
# |            99: } 
# | next:361'0     ~~
# |           100:  
# | next:361'0     ~
# |           101: define fp128 @test_readonly_exp2l_fp128_of_sitofp(i32 %x) { 
# | next:361'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:386'0                                                       X~~~~~~~~~ error: no match found
# |           102:  %ldexpl1 = call fp128 @llvm.ldexp.f128.i32(fp128 0xL00000000000000003FFF000000000000, i32 %x) 
# | next:386'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:386'1               ?                                                                                     possible intended match
# |           103:  ret fp128 %ldexpl1 
# | next:386'0     ~~~~~~~~~~~~~~~~~~~~
# |           104: } 
# | next:386'0     ~~
# |           105:  
# | next:386'0     ~
# |           106: define float @test_readonly_exp2f_f32_of_sitofp_flags(i32 %x) { 
# | next:386'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:406'0                                                           X~~~~~~~~~ error: no match found
# |           107:  %ldexpf1 = call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | next:406'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:406'1         ?                                                                   possible intended match
# |           108:  ret float %ldexpf1 
# | next:406'0     ~~~~~~~~~~~~~~~~~~~~
# |           109: } 
# | next:406'0     ~~
# |           110:  
# | next:406'0     ~
# |           111: ; Function Attrs: nocallback nofree nounwind willreturn memory(errnomem: write) 
# | next:406'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           112: declare double @ldexp(double, i32) #1 
# | next:406'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.Transforms/InstCombine/pow-to-ldexp.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=instcombine /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=CHECK,LDEXP,LDEXP-EXP2 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=instcombine /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=CHECK,LDEXP,LDEXP-EXP2 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll:328:15: error: LDEXP-NEXT: expected string not found in input
# | ; LDEXP-NEXT: [[LDEXPF:%.*]] = tail call float @ldexpf(float 1.000000e+00, i32 [[X]])
# |               ^
# | <stdin>:107:61: note: scanning from here
# | define float @libcall_powf_sitofp_f32_const_base_2(i32 %x) {
# |                                                             ^
# | <stdin>:107:61: note: with "X" equal to "%x"
# | define float @libcall_powf_sitofp_f32_const_base_2(i32 %x) {
# |                                                             ^
# | <stdin>:108:11: note: possible intended match here
# |  %ldexpf1 = tail call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |           ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll:345:15: error: LDEXP-NEXT: expected string not found in input
# | ; LDEXP-NEXT: [[LDEXPF:%.*]] = tail call nnan nsz float @ldexpf(float 1.000000e+00, i32 [[X]])
# |               ^
# | <stdin>:112:68: note: scanning from here
# | define float @libcall_powf_sitofp_f32_const_base_2__flags(i32 %x) {
# |                                                                    ^
# | <stdin>:112:68: note: with "X" equal to "%x"
# | define float @libcall_powf_sitofp_f32_const_base_2__flags(i32 %x) {
# |                                                                    ^
# | <stdin>:113:5: note: possible intended match here
# |  %ldexpf1 = tail call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x)
# |     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/pow-to-ldexp.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           102:  
# |           103: declare double @pow(double, double) 
# |           104:  
# |           105: declare fp128 @powl(fp128, fp128) 
# |           106:  
# |           107: define float @libcall_powf_sitofp_f32_const_base_2(i32 %x) { 
# | next:328'0                                                                 X error: no match found
# | next:328'1                                                                   with "X" equal to "%x"
# |           108:  %ldexpf1 = tail call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | next:328'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:328'2               ?                                                                  possible intended match
# |           109:  ret float %ldexpf1 
# | next:328'0     ~~~~~~~~~~~~~~~~~~~~
# |           110: } 
# | next:328'0     ~~
# |           111:  
# | next:328'0     ~
# |           112: define float @libcall_powf_sitofp_f32_const_base_2__flags(i32 %x) { 
# | next:328'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:345'0                                                                        X error: no match found
# | next:345'1                                                                          with "X" equal to "%x"
# |           113:  %ldexpf1 = tail call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# | next:345'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:345'2         ?                                                                        possible intended match
# |           114:  ret float %ldexpf1 
# | next:345'0     ~~~~~~~~~~~~~~~~~~~~
# |           115: } 
# | next:345'0     ~~
# |           116:  
# | next:345'0     ~
# |           117: define float @readnone_libcall_powf_sitofp_f32_const_base_2(i32 %x) { 
# | next:345'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           118:  %exp2 = tail call float @llvm.ldexp.f32.i32(float 1.000000e+00, i32 %x) 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.Transforms/InstCombine/simplify-libcalls-i16.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls-i16.ll -mtriple=unknown -passes=instcombine | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=CHECK,CHECK32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls-i16.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=unknown -passes=instcombine
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=CHECK,CHECK32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls-i16.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls-i16.ll:274:17: error: CHECK32-NEXT: expected string not found in input
# | ; CHECK32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:139:27: note: scanning from here
# | define double @fake_ldexp(i32 %x) {
# |                           ^
# | <stdin>:140:8: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x)
# |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls-i16.ll:291:17: error: CHECK32-NEXT: expected string not found in input
# | ; CHECK32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:145:25: note: scanning from here
# |  %1 = sext i16 %x to i32
# |                         ^
# | <stdin>:145:25: note: with "TMP1" equal to "%1"
# |  %1 = sext i16 %x to i32
# |                         ^
# | <stdin>:146:10: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1)
# |          ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls-i16.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           134: define double @fake_exp2(double %x) { 
# |           135:  %exp2 = call double @exp2(double %x) 
# |           136:  ret double %exp2 
# |           137: } 
# |           138:  
# |           139: define double @fake_ldexp(i32 %x) { 
# | next:274'0                               X~~~~~~~~~ error: no match found
# |           140:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x) 
# | next:274'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:274'1            ?                                                                 possible intended match
# |           141:  ret double %ldexp1 
# | next:274'0     ~~~~~~~~~~~~~~~~~~~~
# |           142: } 
# | next:274'0     ~~
# |           143:  
# | next:274'0     ~
# |           144: define double @fake_ldexp_16(i16 %x) { 
# | next:274'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           145:  %1 = sext i16 %x to i32 
# | next:291'0                             X error: no match found
# | next:291'1                               with "TMP1" equal to "%1"
# |           146:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1) 
# | next:291'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:291'2              ?                                                               possible intended match
# |           147:  ret double %ldexp1 
# | next:291'0     ~~~~~~~~~~~~~~~~~~~~
# |           148: } 
# | next:291'0     ~~
# |           149:  
# | next:291'0     ~
# |           150: declare i16 @snprintf(ptr, double, ptr) 
# | next:291'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           151:  
# | next:291'0     ~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

LLVM.Transforms/InstCombine/simplify-libcalls.ll
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls.ll -mtriple=unknown -passes=instcombine | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=CHECK,CHECK32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -mtriple=unknown -passes=instcombine
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=CHECK,CHECK32 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls.ll:285:17: error: CHECK32-NEXT: expected string not found in input
# | ; CHECK32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[X:%.*]])
# |                 ^
# | <stdin>:133:27: note: scanning from here
# | define double @fake_ldexp(i32 %x) {
# |                           ^
# | <stdin>:134:8: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x)
# |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls.ll:302:17: error: CHECK32-NEXT: expected string not found in input
# | ; CHECK32-NEXT: [[LDEXP:%.*]] = call double @ldexp(double 1.000000e+00, i32 [[TMP1]])
# |                 ^
# | <stdin>:139:25: note: scanning from here
# |  %1 = sext i16 %x to i32
# |                         ^
# | <stdin>:139:25: note: with "TMP1" equal to "%1"
# |  %1 = sext i16 %x to i32
# |                         ^
# | <stdin>:140:10: note: possible intended match here
# |  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1)
# |          ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/simplify-libcalls.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           128: define double @fake_exp2(double %x) { 
# |           129:  %exp2 = call double @exp2(double %x) 
# |           130:  ret double %exp2 
# |           131: } 
# |           132:  
# |           133: define double @fake_ldexp(i32 %x) { 
# | next:285'0                               X~~~~~~~~~ error: no match found
# |           134:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %x) 
# | next:285'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:285'1            ?                                                                 possible intended match
# |           135:  ret double %ldexp1 
# | next:285'0     ~~~~~~~~~~~~~~~~~~~~
# |           136: } 
# | next:285'0     ~~
# |           137:  
# | next:285'0     ~
# |           138: define double @fake_ldexp_16(i16 %x) { 
# | next:285'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           139:  %1 = sext i16 %x to i32 
# | next:302'0                             X error: no match found
# | next:302'1                               with "TMP1" equal to "%1"
# |           140:  %ldexp1 = call double @llvm.ldexp.f64.i32(double 1.000000e+00, i32 %1) 
# | next:302'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:302'2              ?                                                               possible intended match
# |           141:  ret double %ldexp1 
# | next:302'0     ~~~~~~~~~~~~~~~~~~~~
# |           142: } 
# | next:302'0     ~~
# |           143:  
# | next:302'0     ~
# |           144: declare i32 @snprintf(ptr, double, ptr) 
# | next:302'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           145:  
# | next:302'0     ~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the infrastructure label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants