[llvm] [InstCombine] Propagate poison pow[i] (PR #146750)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 03:16:28 PDT 2025
================
@@ -44,3 +44,33 @@ define void @powi_i16(float %V, ptr%P) {
ret void
}
+
+define void @pow_poison_i16(i16 %arg_int,float %arg_flt, ptr %P) {
+; CHECK-LABEL: @pow_poison_i16(
+; CHECK-NEXT: store volatile float poison, ptr [[P:%.*]], align 4
+; CHECK-NEXT: store volatile float poison, ptr [[P]], align 4
+; CHECK-NEXT: store volatile float poison, ptr [[P]], align 4
+; CHECK-NEXT: store volatile float poison, ptr [[P]], align 4
+; CHECK-NEXT: store volatile float poison, ptr [[P]], align 4
+; CHECK-NEXT: store volatile float poison, ptr [[P]], align 4
+; CHECK-NEXT: ret void
+;
+ %2 = tail call float @llvm.powi.f32.i16(float poison, i16 %arg_int) nounwind
----------------
lukel97 wrote:
I think nowadays you can leave out the type overload on the intrinsic signatures
```suggestion
%2 = tail call float @llvm.powi(float poison, i16 %arg_int) nounwind
```
https://github.com/llvm/llvm-project/pull/146750
More information about the llvm-commits
mailing list