[llvm] [DAG] isConstantIntBuildVectorOrConstantInt - peek through bitcasts (PR #112710)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 07:45:22 PDT 2024


================
@@ -56552,8 +56552,8 @@ static SDValue combineSub(SDNode *N, SelectionDAG &DAG,
 
   // TODO: Add NoOpaque handling to isConstantIntBuildVectorOrConstantInt.
   auto IsNonOpaqueConstant = [&](SDValue Op) {
-    if (SDNode *C = DAG.isConstantIntBuildVectorOrConstantInt(Op)) {
-      if (auto *Cst = dyn_cast<ConstantSDNode>(C))
+    if (DAG.isConstantIntBuildVectorOrConstantInt(Op)) {
+      if (auto *Cst = dyn_cast<ConstantSDNode>(Op))
----------------
RKSimon wrote:

good catch!

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


More information about the llvm-commits mailing list