Issue 146560
Summary Poison not propagate through @llvm.pow[i]
Labels llvm:instcombine, constant-folding
Assignees
Reporter lukel97
    I believe we should be able to fold `@llvm.pow[i]` with a poison operand to poison:

```llvm
define float @src(float %x) {
  %powi = call float @llvm.powi(float poison, i32 %pow)
  ret float %powi
}

define float @tgt(float %x) {
  ret float poison
}
```

But we don't do this today: https://godbolt.org/z/EGrYPc6oW

I can't think of a reason why poison wouldn't propagate, I presume it would act similarly to e.g. `@llvm.sqrt` which we do fold poison through.

Alive doesn't seem to support the pow[i] libcall just yet https://alive2.llvm.org/ce/z/CXcVgc
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to