[llvm] [llvm][gvn-sink] Don't try to sink inline asm (PR #138414)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon May 5 09:26:54 PDT 2025
================
@@ -4220,8 +4220,11 @@ bool llvm::canReplaceOperandWithVariable(const Instruction *I, unsigned OpIdx) {
return false;
// Early exit.
- if (!isa<Constant>(I->getOperand(OpIdx)))
+ if (!isa<Constant>(I->getOperand(OpIdx))) {
----------------
nikic wrote:
```suggestion
if (!isa<Constant, InlineAsm>(I->getOperand(OpIdx))) {
```
Could we do something like this instead?
https://github.com/llvm/llvm-project/pull/138414
More information about the llvm-commits
mailing list