Skip to content

Conversation

@paulwalker-arm
Copy link
Collaborator

This extends the constant folds to support vector ConstantInt/FP.

…MContext...

This extends the constant folds to support vector ConstantInt/FP.
@llvmbot llvmbot added llvm:instcombine Covers the InstCombine, InstSimplify and AggressiveInstCombine passes llvm:ir llvm:transforms labels Dec 13, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 13, 2024

@llvm/pr-subscribers-llvm-ir

Author: Paul Walker (paulwalker-arm)

Changes

This extends the constant folds to support vector ConstantInt/FP.


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

8 Files Affected:

  • (modified) llvm/lib/IR/ConstantFold.cpp (+14-15)
  • (modified) llvm/lib/IR/Constants.cpp (+3)
  • (modified) llvm/test/Transforms/InstCombine/clamp-to-minmax.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fadd.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fdiv.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fmul.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fneg.ll (+1)
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 3a04f81315e6c6..b577f69eeaba0b 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -198,9 +198,9 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V,
     if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
       bool ignored;
       APFloat Val = FPC->getValueAPF();
-      Val.convert(DestTy->getFltSemantics(), APFloat::rmNearestTiesToEven,
-                  &ignored);
-      return ConstantFP::get(V->getContext(), Val);
+      Val.convert(DestTy->getScalarType()->getFltSemantics(),
+                  APFloat::rmNearestTiesToEven, &ignored);
+      return ConstantFP::get(DestTy, Val);
     }
     return nullptr; // Can't fold.
   case Instruction::FPToUI:
@@ -208,26 +208,25 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V,
     if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
       const APFloat &V = FPC->getValueAPF();
       bool ignored;
-      uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth();
-      APSInt IntVal(DestBitWidth, opc == Instruction::FPToUI);
+      APSInt IntVal(DestTy->getScalarSizeInBits(), opc == Instruction::FPToUI);
       if (APFloat::opInvalidOp ==
           V.convertToInteger(IntVal, APFloat::rmTowardZero, &ignored)) {
         // Undefined behavior invoked - the destination type can't represent
         // the input constant.
         return PoisonValue::get(DestTy);
       }
-      return ConstantInt::get(FPC->getContext(), IntVal);
+      return ConstantInt::get(DestTy, IntVal);
     }
     return nullptr; // Can't fold.
   case Instruction::UIToFP:
   case Instruction::SIToFP:
     if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
       const APInt &api = CI->getValue();
-      APFloat apf(DestTy->getFltSemantics(),
-                  APInt::getZero(DestTy->getPrimitiveSizeInBits()));
+      APFloat apf(DestTy->getScalarType()->getFltSemantics(),
+                  APInt::getZero(DestTy->getScalarSizeInBits()));
       apf.convertFromAPInt(api, opc==Instruction::SIToFP,
                            APFloat::rmNearestTiesToEven);
-      return ConstantFP::get(V->getContext(), apf);
+      return ConstantFP::get(DestTy, apf);
     }
     return nullptr;
   case Instruction::ZExt:
@@ -573,7 +572,7 @@ Constant *llvm::ConstantFoldUnaryInstruction(unsigned Opcode, Constant *C) {
     default:
       break;
     case Instruction::FNeg:
-      return ConstantFP::get(C->getContext(), neg(CV));
+      return ConstantFP::get(C->getType(), neg(CV));
     }
   } else if (auto *VTy = dyn_cast<VectorType>(C->getType())) {
     // Fast path for splatted constants.
@@ -857,19 +856,19 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1,
         break;
       case Instruction::FAdd:
         (void)C3V.add(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FSub:
         (void)C3V.subtract(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FMul:
         (void)C3V.multiply(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FDiv:
         (void)C3V.divide(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FRem:
         (void)C3V.mod(C2V);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       }
     }
   }
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 95832ed0b8951a..949c23609c9d05 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -358,6 +358,9 @@ bool Constant::containsUndefElement() const {
 }
 
 bool Constant::containsConstantExpression() const {
+  if (isa<ConstantInt>(this) || isa<ConstantFP>(this))
+    return false;
+
   if (auto *VTy = dyn_cast<FixedVectorType>(getType())) {
     for (unsigned i = 0, e = VTy->getNumElements(); i != e; ++i)
       if (isa<ConstantExpr>(getAggregateElement(i)))
diff --git a/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll b/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
index a81259b147fb75..478d437847127b 100644
--- a/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
+++ b/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -use-constant-fp-for-fixed-length-splat -use-constant-int-for-fixed-length-splat -S | FileCheck %s
 
 ; (X < C1) ? C1 : MIN(X, C2)
 define float @clamp_float_fast_ordered_strict_maxmin(float %x) {
diff --git a/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll b/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll
index dd8d0aed3210e1..b77d6b51f92207 100644
--- a/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll
+++ b/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
 ; RUN: opt -S -passes=instcombine %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -use-constant-fp-for-fixed-length-splat %s | FileCheck %s
 
 define float @fabs_fneg_basic(float %x) {
 ; CHECK-LABEL: define float @fabs_fneg_basic(
diff --git a/llvm/test/Transforms/InstCombine/fadd.ll b/llvm/test/Transforms/InstCombine/fadd.ll
index 36c387969d05d6..094137b7f3ddf6 100644
--- a/llvm/test/Transforms/InstCombine/fadd.ll
+++ b/llvm/test/Transforms/InstCombine/fadd.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -use-constant-fp-for-fixed-length-splat -S | FileCheck %s
 
 declare void @use(float)
 declare void @use_vec(<2 x float>)
diff --git a/llvm/test/Transforms/InstCombine/fdiv.ll b/llvm/test/Transforms/InstCombine/fdiv.ll
index ad187e22014e46..54b0bf8c50ac70 100644
--- a/llvm/test/Transforms/InstCombine/fdiv.ll
+++ b/llvm/test/Transforms/InstCombine/fdiv.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -use-constant-fp-for-fixed-length-splat < %s | FileCheck %s
 
 declare float @llvm.fabs.f32(float) nounwind readnone
 declare float @llvm.pow.f32(float, float) nounwind readnone
diff --git a/llvm/test/Transforms/InstCombine/fmul.ll b/llvm/test/Transforms/InstCombine/fmul.ll
index fde0b8ab461a9d..cd4a8e36c6e239 100644
--- a/llvm/test/Transforms/InstCombine/fmul.ll
+++ b/llvm/test/Transforms/InstCombine/fmul.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -use-constant-fp-for-fixed-length-splat < %s | FileCheck %s
 
 ; (-0.0 - X) * C => X * -C
 define float @neg_constant(float %x) {
diff --git a/llvm/test/Transforms/InstCombine/fneg.ll b/llvm/test/Transforms/InstCombine/fneg.ll
index 549291f2c4f0db..755beff9bf77a4 100644
--- a/llvm/test/Transforms/InstCombine/fneg.ll
+++ b/llvm/test/Transforms/InstCombine/fneg.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -use-constant-fp-for-fixed-length-splat -S | FileCheck %s
 
 declare float @llvm.ldexp.f32.i32(float, i32)
 declare <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float>, <2 x i32>)

@llvmbot
Copy link
Member

llvmbot commented Dec 13, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Paul Walker (paulwalker-arm)

Changes

This extends the constant folds to support vector ConstantInt/FP.


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

8 Files Affected:

  • (modified) llvm/lib/IR/ConstantFold.cpp (+14-15)
  • (modified) llvm/lib/IR/Constants.cpp (+3)
  • (modified) llvm/test/Transforms/InstCombine/clamp-to-minmax.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fadd.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fdiv.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fmul.ll (+1)
  • (modified) llvm/test/Transforms/InstCombine/fneg.ll (+1)
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 3a04f81315e6c6..b577f69eeaba0b 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -198,9 +198,9 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V,
     if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
       bool ignored;
       APFloat Val = FPC->getValueAPF();
-      Val.convert(DestTy->getFltSemantics(), APFloat::rmNearestTiesToEven,
-                  &ignored);
-      return ConstantFP::get(V->getContext(), Val);
+      Val.convert(DestTy->getScalarType()->getFltSemantics(),
+                  APFloat::rmNearestTiesToEven, &ignored);
+      return ConstantFP::get(DestTy, Val);
     }
     return nullptr; // Can't fold.
   case Instruction::FPToUI:
@@ -208,26 +208,25 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V,
     if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
       const APFloat &V = FPC->getValueAPF();
       bool ignored;
-      uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth();
-      APSInt IntVal(DestBitWidth, opc == Instruction::FPToUI);
+      APSInt IntVal(DestTy->getScalarSizeInBits(), opc == Instruction::FPToUI);
       if (APFloat::opInvalidOp ==
           V.convertToInteger(IntVal, APFloat::rmTowardZero, &ignored)) {
         // Undefined behavior invoked - the destination type can't represent
         // the input constant.
         return PoisonValue::get(DestTy);
       }
-      return ConstantInt::get(FPC->getContext(), IntVal);
+      return ConstantInt::get(DestTy, IntVal);
     }
     return nullptr; // Can't fold.
   case Instruction::UIToFP:
   case Instruction::SIToFP:
     if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
       const APInt &api = CI->getValue();
-      APFloat apf(DestTy->getFltSemantics(),
-                  APInt::getZero(DestTy->getPrimitiveSizeInBits()));
+      APFloat apf(DestTy->getScalarType()->getFltSemantics(),
+                  APInt::getZero(DestTy->getScalarSizeInBits()));
       apf.convertFromAPInt(api, opc==Instruction::SIToFP,
                            APFloat::rmNearestTiesToEven);
-      return ConstantFP::get(V->getContext(), apf);
+      return ConstantFP::get(DestTy, apf);
     }
     return nullptr;
   case Instruction::ZExt:
@@ -573,7 +572,7 @@ Constant *llvm::ConstantFoldUnaryInstruction(unsigned Opcode, Constant *C) {
     default:
       break;
     case Instruction::FNeg:
-      return ConstantFP::get(C->getContext(), neg(CV));
+      return ConstantFP::get(C->getType(), neg(CV));
     }
   } else if (auto *VTy = dyn_cast<VectorType>(C->getType())) {
     // Fast path for splatted constants.
@@ -857,19 +856,19 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1,
         break;
       case Instruction::FAdd:
         (void)C3V.add(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FSub:
         (void)C3V.subtract(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FMul:
         (void)C3V.multiply(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FDiv:
         (void)C3V.divide(C2V, APFloat::rmNearestTiesToEven);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       case Instruction::FRem:
         (void)C3V.mod(C2V);
-        return ConstantFP::get(C1->getContext(), C3V);
+        return ConstantFP::get(C1->getType(), C3V);
       }
     }
   }
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index 95832ed0b8951a..949c23609c9d05 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -358,6 +358,9 @@ bool Constant::containsUndefElement() const {
 }
 
 bool Constant::containsConstantExpression() const {
+  if (isa<ConstantInt>(this) || isa<ConstantFP>(this))
+    return false;
+
   if (auto *VTy = dyn_cast<FixedVectorType>(getType())) {
     for (unsigned i = 0, e = VTy->getNumElements(); i != e; ++i)
       if (isa<ConstantExpr>(getAggregateElement(i)))
diff --git a/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll b/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
index a81259b147fb75..478d437847127b 100644
--- a/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
+++ b/llvm/test/Transforms/InstCombine/clamp-to-minmax.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -use-constant-fp-for-fixed-length-splat -use-constant-int-for-fixed-length-splat -S | FileCheck %s
 
 ; (X < C1) ? C1 : MIN(X, C2)
 define float @clamp_float_fast_ordered_strict_maxmin(float %x) {
diff --git a/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll b/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll
index dd8d0aed3210e1..b77d6b51f92207 100644
--- a/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll
+++ b/llvm/test/Transforms/InstCombine/fabs-fneg-fold.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
 ; RUN: opt -S -passes=instcombine %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -use-constant-fp-for-fixed-length-splat %s | FileCheck %s
 
 define float @fabs_fneg_basic(float %x) {
 ; CHECK-LABEL: define float @fabs_fneg_basic(
diff --git a/llvm/test/Transforms/InstCombine/fadd.ll b/llvm/test/Transforms/InstCombine/fadd.ll
index 36c387969d05d6..094137b7f3ddf6 100644
--- a/llvm/test/Transforms/InstCombine/fadd.ll
+++ b/llvm/test/Transforms/InstCombine/fadd.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -use-constant-fp-for-fixed-length-splat -S | FileCheck %s
 
 declare void @use(float)
 declare void @use_vec(<2 x float>)
diff --git a/llvm/test/Transforms/InstCombine/fdiv.ll b/llvm/test/Transforms/InstCombine/fdiv.ll
index ad187e22014e46..54b0bf8c50ac70 100644
--- a/llvm/test/Transforms/InstCombine/fdiv.ll
+++ b/llvm/test/Transforms/InstCombine/fdiv.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -use-constant-fp-for-fixed-length-splat < %s | FileCheck %s
 
 declare float @llvm.fabs.f32(float) nounwind readnone
 declare float @llvm.pow.f32(float, float) nounwind readnone
diff --git a/llvm/test/Transforms/InstCombine/fmul.ll b/llvm/test/Transforms/InstCombine/fmul.ll
index fde0b8ab461a9d..cd4a8e36c6e239 100644
--- a/llvm/test/Transforms/InstCombine/fmul.ll
+++ b/llvm/test/Transforms/InstCombine/fmul.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
+; RUN: opt -S -passes=instcombine -use-constant-fp-for-fixed-length-splat < %s | FileCheck %s
 
 ; (-0.0 - X) * C => X * -C
 define float @neg_constant(float %x) {
diff --git a/llvm/test/Transforms/InstCombine/fneg.ll b/llvm/test/Transforms/InstCombine/fneg.ll
index 549291f2c4f0db..755beff9bf77a4 100644
--- a/llvm/test/Transforms/InstCombine/fneg.ll
+++ b/llvm/test/Transforms/InstCombine/fneg.ll
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
+; RUN: opt < %s -passes=instcombine -use-constant-fp-for-fixed-length-splat -S | FileCheck %s
 
 declare float @llvm.ldexp.f32.i32(float, i32)
 declare <2 x float> @llvm.ldexp.v2f32.v2i32(<2 x float>, <2 x i32>)

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

LGTM

@paulwalker-arm paulwalker-arm merged commit 02328e0 into llvm:main Dec 16, 2024
12 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 16, 2024

LLVM Buildbot has detected a new failure on builder openmp-gcc-x86_64-linux-debian running on gribozavr4 while building llvm at step 6 "test-openmp".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/70/builds/5383

Here is the relevant piece of the build log for the reference
Step 6 (test-openmp) failure: test (failure)
******************** TEST 'libomp :: tasking/issue-94260-2.c' FAILED ********************
Exit Code: -11

Command Output (stdout):
--
# RUN: at line 1
/b/1/openmp-gcc-x86_64-linux-debian/llvm.build/./bin/clang -fopenmp   -I /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -I /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/openmp/runtime/test -L /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -fno-omit-frame-pointer -I /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/openmp/runtime/test/ompt /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c -o /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp -lm -latomic && /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# executed command: /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/./bin/clang -fopenmp -I /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -I /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/openmp/runtime/test -L /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -fno-omit-frame-pointer -I /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/openmp/runtime/test/ompt /b/1/openmp-gcc-x86_64-linux-debian/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c -o /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp -lm -latomic
# executed command: /b/1/openmp-gcc-x86_64-linux-debian/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -11

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 16, 2024

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-ubuntu running on as-builder-9 while building llvm at step 16 "test-check-lldb-api".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/2433

Here is the relevant piece of the build log for the reference
Step 16 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
...
PASS: lldb-api :: types/TestIntegerType.py (1207 of 1216)
PASS: lldb-api :: types/TestIntegerTypeExpr.py (1208 of 1216)
PASS: lldb-api :: types/TestRecursiveTypes.py (1209 of 1216)
PASS: lldb-api :: types/TestLongTypes.py (1210 of 1216)
PASS: lldb-api :: types/TestShortType.py (1211 of 1216)
PASS: lldb-api :: types/TestShortTypeExpr.py (1212 of 1216)
PASS: lldb-api :: types/TestLongTypesExpr.py (1213 of 1216)
PASS: lldb-api :: tools/lldb-server/TestNonStop.py (1214 of 1216)
PASS: lldb-api :: tools/lldb-server/TestGdbRemote_vCont.py (1215 of 1216)
UNRESOLVED: lldb-api :: tools/lldb-server/TestLldbGdbServer.py (1216 of 1216)
******************** TEST 'lldb-api :: tools/lldb-server/TestLldbGdbServer.py' FAILED ********************
Script:
--
/usr/bin/python3.12 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --libcxx-include-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/c++/v1 --libcxx-include-target-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/aarch64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib/aarch64-unknown-linux-gnu --arch aarch64 --build-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/lldb --compiler /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang --dsymutil /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --lldb-obj-root /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb --lldb-libs-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --platform-url connect://jetson-agx-2198.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot /mnt/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/tools/lldb-server -p TestLldbGdbServer.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 20.0.0git (https://github.com/llvm/llvm-project.git revision 02328e0465c256293950542f1a85eb55bcbc9d45)
  clang revision 02328e0465c256293950542f1a85eb55bcbc9d45
  llvm revision 02328e0465c256293950542f1a85eb55bcbc9d45
Setting up remote platform 'remote-linux'
Connecting to remote platform 'remote-linux' at 'connect://jetson-agx-2198.lab.llvm.org:1234'...
Connected.
Setting remote platform working directory to '/home/ubuntu/lldb-tests'...
Skipping the following test categories: ['dsym', 'gmodules', 'debugserver', 'objc', 'lldb-dap']
connect to debug monitor on port 16990 failed, attempt #1 of 10
connect to debug monitor on port 13199 failed, attempt #2 of 10
connect to debug monitor on port 18882 failed, attempt #3 of 10
connect to debug monitor on port 19932 failed, attempt #4 of 10
connect to debug monitor on port 19767 failed, attempt #5 of 10
connect to debug monitor on port 14493 failed, attempt #6 of 10
connect to debug monitor on port 17702 failed, attempt #7 of 10
connect to debug monitor on port 18272 failed, attempt #8 of 10
connect to debug monitor on port 13387 failed, attempt #9 of 10
connect to debug monitor on port 12203 failed, attempt #10 of 10

--
Command Output (stderr):
--
WARNING:root:Custom libc++ is not supported for remote runs: ignoring --libcxx arguments
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hc_then_Csignal_signals_correct_thread_launch_debugserver (TestLldbGdbServer.LldbGdbServerTestCase.test_Hc_then_Csignal_signals_correct_thread_launch_debugserver) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hc_then_Csignal_signals_correct_thread_launch_llgs (TestLldbGdbServer.LldbGdbServerTestCase.test_Hc_then_Csignal_signals_correct_thread_launch_llgs)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hg_fails_on_another_pid_llgs (TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_fails_on_another_pid_llgs)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hg_fails_on_minus_one_pid_llgs (TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_fails_on_minus_one_pid_llgs)
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hg_fails_on_zero_pid_llgs (TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_fails_on_zero_pid_llgs)
UNSUPPORTED: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hg_switches_to_3_threads_launch_debugserver (TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_switches_to_3_threads_launch_debugserver) (test case does not fall in any category of interest for this run) 
PASS: LLDB (/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang-aarch64) :: test_Hg_switches_to_3_threads_launch_llgs (TestLldbGdbServer.LldbGdbServerTestCase.test_Hg_switches_to_3_threads_launch_llgs)

@paulwalker-arm paulwalker-arm deleted the vector-constants-ir-fp-binop branch December 16, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:instcombine Covers the InstCombine, InstSimplify and AggressiveInstCombine passes llvm:ir llvm:transforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants