[llvm] ValueTracking: introduce llvm::isLanewiseOperation (PR #112011)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 09:01:00 PDT 2024
================
@@ -6947,6 +6947,30 @@ bool llvm::onlyUsedByLifetimeMarkersOrDroppableInsts(const Value *V) {
V, /* AllowLifetime */ true, /* AllowDroppable */ true);
}
+bool llvm::isLanewiseOperation(const Instruction *I) {
+ if (auto *II = dyn_cast<IntrinsicInst>(I)) {
----------------
goldsteinn wrote:
```
if (isBinaryOp() || isUnaryOp())
return true;
if (isCast() && !isa<BitCastInst>(this))
return true;
if (isa<SelectInst>(this) || isa<CmpInst>(this))
return true;
```
probably
https://github.com/llvm/llvm-project/pull/112011
More information about the llvm-commits
mailing list