[llvm] Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass (PR #65963)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 09:59:21 PDT 2023
================
@@ -0,0 +1,18 @@
+;; Make sure internal constrained FP intrinsics still merge properly
+; RUN: opt -passes=mergefunc -S < %s | FileCheck %s
+
+declare float @llvm.experimental.constrained.fadd.f32(float, float, metadata, metadata)
+
+define float @func1(float %a, float %b) {
+; CHECK-LABEL: define float @func1(float %a, float %b)
+ %result = call float @llvm.experimental.constrained.fadd.f32(float %a, float %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ %result_2 = call float @llvm.experimental.constrained.fadd.f32(float %a, float %b, metadata !"round.dynamic", metadata !"fpexcept.strict")
+ ret float %result
+}
+
+define float @func2(float %a, float %b) {
+; CHECK-NOT: define float @func2(float %a, float %b)
----------------
nikic wrote:
This doesn't do what you think it does: https://llvm.godbolt.org/z/xoqa7er8x The CHECK-NOT only passes because the arguments are renamed.
Please use update_test_checks.py instead. Always.
https://github.com/llvm/llvm-project/pull/65963
More information about the llvm-commits
mailing list