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

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 07:15:54 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))
----------------
phoebewang wrote:

Is it a problem when `Op` is a bitcast?

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


More information about the llvm-commits mailing list