Adds a new utility function: isConstantOrConstantVector().
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/GlobalISel/Utils.cpp | ||
---|---|---|
1019–1030 | Actually this doesn't have the same meaning as the DAG counterpart. This one only checks for constant scalars or splats of scalars. I'll rename this to make it clear. |
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
2247 | New code should use isZero instead. |
Comment Actions
It still seems a bit messy that we throw away the constant's width in getBuildVectorConstantSplat and then put it back again in isConstantOrConstantSplatVector, but I guess that needn't hold up this patch.
New code should use isZero instead.