[llvm] [ConstantFolding] Fold sqrt poison -> poison (PR #141821)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri May 30 05:47:37 PDT 2025
================
@@ -293,3 +293,45 @@ define double @fmul_nnan_inf_op1(double %x) {
%r = fmul nnan double %x, 0xfff0000000000000
ret double %r
}
+
+define float @sqrt_poison() {
+; CHECK-LABEL: @sqrt_poison(
+; CHECK-NEXT: ret float poison
+;
+ %sqrt = call float @llvm.sqrt(float poison)
+ ret float %sqrt
+}
+
+define <2 x float> @sqrt_poison_fixed_vec() {
----------------
dtcxzyw wrote:
Can you add a case with `<float 1.0, float poison>`?
https://github.com/llvm/llvm-project/pull/141821
More information about the llvm-commits
mailing list