llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Mészáros Gergely (Maetveis) <details> <summary>Changes</summary> - Add tests for complex divdent and real divisor - Add tests for complex * real multiplication - Add tests for multiply/divide and assign (`/=`,`*=`) operators --- Patch is 510.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/131447.diff 2 Files Affected: - (added) clang/test/CodeGen/cx-complex-range-real.c (+2446) - (modified) clang/test/CodeGen/cx-complex-range.c (+3274-285) ``````````diff diff --git a/clang/test/CodeGen/cx-complex-range-real.c b/clang/test/CodeGen/cx-complex-range-real.c new file mode 100644 index 0000000000000..1723075be30fd --- /dev/null +++ b/clang/test/CodeGen/cx-complex-range-real.c @@ -0,0 +1,2446 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \ +// RUN: -o - | FileCheck %s --check-prefix=FULL + +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \ +// RUN: -complex-range=basic -o - | FileCheck %s --check-prefix=BASIC + +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \ +// RUN: -complex-range=improved -o - | FileCheck %s --check-prefix=IMPRVD + +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \ +// RUN: -complex-range=promoted -o - | FileCheck %s --check-prefix=PRMTD + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \ +// RUN: -ffast-math -complex-range=full -emit-llvm -o - %s \ +// RUN: | FileCheck %s --check-prefix=FULL_FAST + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -complex-range=promoted \ +// RUN: -ffp-contract=off -frounding-math -ffp-exception-behavior=strict \ +// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefix=PRMTD_STRICT + +// AVRFP32-LABEL: define dso_local { float, float } @mulaf( +// AVRFP32-SAME: float noundef [[A_COERCE0:%.*]], float noundef [[A_COERCE1:%.*]], float noundef [[B:%.*]]) addrspace(1) #[[ATTR0:[0-9]+]] { +// AVRFP32-NEXT: [[ENTRY:.*:]] +// AVRFP32-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 1 +// AVRFP32-NEXT: [[A:%.*]] = alloca { float, float }, align 1 +// AVRFP32-NEXT: [[B_ADDR:%.*]] = alloca float, align 1 +// AVRFP32-NEXT: [[TMP0:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 0 +// AVRFP32-NEXT: store float [[A_COERCE0]], ptr [[TMP0]], align 1 +// AVRFP32-NEXT: [[TMP1:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 1 +// AVRFP32-NEXT: store float [[A_COERCE1]], ptr [[TMP1]], align 1 +// AVRFP32-NEXT: store float [[B]], ptr [[B_ADDR]], align 1 +// AVRFP32-NEXT: [[A_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 0 +// AVRFP32-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 1 +// AVRFP32-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[A]], i32 0, i32 1 +// AVRFP32-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 1 +// AVRFP32-NEXT: [[TMP2:%.*]] = load float, ptr [[B_ADDR]], align 1 +// AVRFP32-NEXT: [[MUL_RL:%.*]] = fmul float [[A_REAL]], [[TMP2]] +// AVRFP32-NEXT: [[MUL_IL:%.*]] = fmul float [[A_IMAG]], [[TMP2]] +// AVRFP32-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// AVRFP32-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// AVRFP32-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 1 +// AVRFP32-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 1 +// AVRFP32-NEXT: [[TMP3:%.*]] = load { float, float }, ptr [[RETVAL]], align 1 +// AVRFP32-NEXT: ret { float, float } [[TMP3]] +// FULL-LABEL: define dso_local <2 x float> @mulaf( +// FULL-SAME: <2 x float> noundef [[A_COERCE:%.*]], float noundef [[B:%.*]]) #[[ATTR0:[0-9]+]] { +// FULL-NEXT: [[ENTRY:.*:]] +// FULL-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4 +// FULL-NEXT: [[A:%.*]] = alloca { float, float }, align 4 +// FULL-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// FULL-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4 +// FULL-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// FULL-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 0 +// FULL-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4 +// FULL-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 1 +// FULL-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4 +// FULL-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// FULL-NEXT: [[MUL_RL:%.*]] = fmul float [[A_REAL]], [[TMP0]] +// FULL-NEXT: [[MUL_IL:%.*]] = fmul float [[A_IMAG]], [[TMP0]] +// FULL-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// FULL-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// FULL-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 4 +// FULL-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 4 +// FULL-NEXT: [[TMP1:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4 +// FULL-NEXT: ret <2 x float> [[TMP1]] +// +// BASIC-LABEL: define dso_local <2 x float> @mulaf( +// BASIC-SAME: <2 x float> noundef [[A_COERCE:%.*]], float noundef [[B:%.*]]) #[[ATTR0:[0-9]+]] { +// BASIC-NEXT: [[ENTRY:.*:]] +// BASIC-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4 +// BASIC-NEXT: [[A:%.*]] = alloca { float, float }, align 4 +// BASIC-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// BASIC-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4 +// BASIC-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// BASIC-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 0 +// BASIC-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4 +// BASIC-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 1 +// BASIC-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4 +// BASIC-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// BASIC-NEXT: [[MUL_RL:%.*]] = fmul float [[A_REAL]], [[TMP0]] +// BASIC-NEXT: [[MUL_IL:%.*]] = fmul float [[A_IMAG]], [[TMP0]] +// BASIC-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// BASIC-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// BASIC-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 4 +// BASIC-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 4 +// BASIC-NEXT: [[TMP1:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4 +// BASIC-NEXT: ret <2 x float> [[TMP1]] +// +// IMPRVD-LABEL: define dso_local <2 x float> @mulaf( +// IMPRVD-SAME: <2 x float> noundef [[A_COERCE:%.*]], float noundef [[B:%.*]]) #[[ATTR0:[0-9]+]] { +// IMPRVD-NEXT: [[ENTRY:.*:]] +// IMPRVD-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4 +// IMPRVD-NEXT: [[A:%.*]] = alloca { float, float }, align 4 +// IMPRVD-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// IMPRVD-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4 +// IMPRVD-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// IMPRVD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 0 +// IMPRVD-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4 +// IMPRVD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 1 +// IMPRVD-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4 +// IMPRVD-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// IMPRVD-NEXT: [[MUL_RL:%.*]] = fmul float [[A_REAL]], [[TMP0]] +// IMPRVD-NEXT: [[MUL_IL:%.*]] = fmul float [[A_IMAG]], [[TMP0]] +// IMPRVD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// IMPRVD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// IMPRVD-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 4 +// IMPRVD-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 4 +// IMPRVD-NEXT: [[TMP1:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4 +// IMPRVD-NEXT: ret <2 x float> [[TMP1]] +// +// PRMTD-LABEL: define dso_local <2 x float> @mulaf( +// PRMTD-SAME: <2 x float> noundef [[A_COERCE:%.*]], float noundef [[B:%.*]]) #[[ATTR0:[0-9]+]] { +// PRMTD-NEXT: [[ENTRY:.*:]] +// PRMTD-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4 +// PRMTD-NEXT: [[A:%.*]] = alloca { float, float }, align 4 +// PRMTD-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// PRMTD-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4 +// PRMTD-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// PRMTD-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 0 +// PRMTD-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4 +// PRMTD-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 1 +// PRMTD-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4 +// PRMTD-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// PRMTD-NEXT: [[MUL_RL:%.*]] = fmul float [[A_REAL]], [[TMP0]] +// PRMTD-NEXT: [[MUL_IL:%.*]] = fmul float [[A_IMAG]], [[TMP0]] +// PRMTD-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// PRMTD-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// PRMTD-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 4 +// PRMTD-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 4 +// PRMTD-NEXT: [[TMP1:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4 +// PRMTD-NEXT: ret <2 x float> [[TMP1]] +// +// FULL_FAST-LABEL: define dso_local nofpclass(nan inf) <2 x float> @mulaf( +// FULL_FAST-SAME: <2 x float> noundef nofpclass(nan inf) [[A_COERCE:%.*]], float noundef nofpclass(nan inf) [[B:%.*]]) #[[ATTR0:[0-9]+]] { +// FULL_FAST-NEXT: [[ENTRY:.*:]] +// FULL_FAST-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4 +// FULL_FAST-NEXT: [[A:%.*]] = alloca { float, float }, align 4 +// FULL_FAST-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// FULL_FAST-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4 +// FULL_FAST-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// FULL_FAST-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 0 +// FULL_FAST-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4 +// FULL_FAST-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 1 +// FULL_FAST-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4 +// FULL_FAST-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// FULL_FAST-NEXT: [[MUL_RL:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[A_REAL]], [[TMP0]] +// FULL_FAST-NEXT: [[MUL_IL:%.*]] = fmul reassoc nnan ninf nsz arcp afn float [[A_IMAG]], [[TMP0]] +// FULL_FAST-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// FULL_FAST-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// FULL_FAST-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 4 +// FULL_FAST-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 4 +// FULL_FAST-NEXT: [[TMP1:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4 +// FULL_FAST-NEXT: ret <2 x float> [[TMP1]] +// +// PRMTD_STRICT-LABEL: define dso_local <2 x float> @mulaf( +// PRMTD_STRICT-SAME: <2 x float> noundef [[A_COERCE:%.*]], float noundef [[B:%.*]]) #[[ATTR0:[0-9]+]] { +// PRMTD_STRICT-NEXT: [[ENTRY:.*:]] +// PRMTD_STRICT-NEXT: [[RETVAL:%.*]] = alloca { float, float }, align 4 +// PRMTD_STRICT-NEXT: [[A:%.*]] = alloca { float, float }, align 4 +// PRMTD_STRICT-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// PRMTD_STRICT-NEXT: store <2 x float> [[A_COERCE]], ptr [[A]], align 4 +// PRMTD_STRICT-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// PRMTD_STRICT-NEXT: [[A_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 0 +// PRMTD_STRICT-NEXT: [[A_REAL:%.*]] = load float, ptr [[A_REALP]], align 4 +// PRMTD_STRICT-NEXT: [[A_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[A]], i32 0, i32 1 +// PRMTD_STRICT-NEXT: [[A_IMAG:%.*]] = load float, ptr [[A_IMAGP]], align 4 +// PRMTD_STRICT-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// PRMTD_STRICT-NEXT: [[MUL_RL:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float [[A_REAL]], float [[TMP0]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR3:[0-9]+]] +// PRMTD_STRICT-NEXT: [[MUL_IL:%.*]] = call float @llvm.experimental.constrained.fmul.f32(float [[A_IMAG]], float [[TMP0]], metadata !"round.dynamic", metadata !"fpexcept.strict") #[[ATTR3]] +// PRMTD_STRICT-NEXT: [[RETVAL_REALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 0 +// PRMTD_STRICT-NEXT: [[RETVAL_IMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[RETVAL]], i32 0, i32 1 +// PRMTD_STRICT-NEXT: store float [[MUL_RL]], ptr [[RETVAL_REALP]], align 4 +// PRMTD_STRICT-NEXT: store float [[MUL_IL]], ptr [[RETVAL_IMAGP]], align 4 +// PRMTD_STRICT-NEXT: [[TMP1:%.*]] = load <2 x float>, ptr [[RETVAL]], align 4 +// PRMTD_STRICT-NEXT: ret <2 x float> [[TMP1]] +// +_Complex float mulaf(_Complex float a, float b) { + return a * b; +} + +// AVRFP32-LABEL: define dso_local void @mulassignf( +// AVRFP32-SAME: ptr noundef [[A:%.*]], float noundef [[B:%.*]]) addrspace(1) #[[ATTR0]] { +// AVRFP32-NEXT: [[ENTRY:.*:]] +// AVRFP32-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 1 +// AVRFP32-NEXT: [[B_ADDR:%.*]] = alloca float, align 1 +// AVRFP32-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 1 +// AVRFP32-NEXT: store float [[B]], ptr [[B_ADDR]], align 1 +// AVRFP32-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 1 +// AVRFP32-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 1 +// AVRFP32-NEXT: [[DOTREALP:%.*]] = getelementptr inbounds { float, float }, ptr [[TMP1]], i32 0, i32 0 +// AVRFP32-NEXT: [[DOTREAL:%.*]] = load float, ptr [[DOTREALP]], align 1 +// AVRFP32-NEXT: [[DOTIMAGP:%.*]] = getelementptr inbounds { float, float }, ptr [[TMP1]], i32 0, i32 1 +// AVRFP32-NEXT: [[DOTIMAG:%.*]] = load float, ptr [[DOTIMAGP]], align 1 +// AVRFP32-NEXT: [[MUL_RL:%.*]] = fmul float [[DOTREAL]], [[TMP0]] +// AVRFP32-NEXT: [[MUL_IL:%.*]] = fmul float [[DOTIMAG]], [[TMP0]] +// AVRFP32-NEXT: [[DOTREALP1:%.*]] = getelementptr inbounds { float, float }, ptr [[TMP1]], i32 0, i32 0 +// AVRFP32-NEXT: [[DOTIMAGP2:%.*]] = getelementptr inbounds { float, float }, ptr [[TMP1]], i32 0, i32 1 +// AVRFP32-NEXT: store float [[MUL_RL]], ptr [[DOTREALP1]], align 1 +// AVRFP32-NEXT: store float [[MUL_IL]], ptr [[DOTIMAGP2]], align 1 +// AVRFP32-NEXT: ret void +// FULL-LABEL: define dso_local void @mulassignf( +// FULL-SAME: ptr noundef [[A:%.*]], float noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] { +// FULL-NEXT: [[ENTRY:.*:]] +// FULL-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8 +// FULL-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// FULL-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8 +// FULL-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// FULL-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// FULL-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8 +// FULL-NEXT: [[DOTREALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// FULL-NEXT: [[DOTREAL:%.*]] = load float, ptr [[DOTREALP]], align 4 +// FULL-NEXT: [[DOTIMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// FULL-NEXT: [[DOTIMAG:%.*]] = load float, ptr [[DOTIMAGP]], align 4 +// FULL-NEXT: [[MUL_RL:%.*]] = fmul float [[DOTREAL]], [[TMP0]] +// FULL-NEXT: [[MUL_IL:%.*]] = fmul float [[DOTIMAG]], [[TMP0]] +// FULL-NEXT: [[DOTREALP1:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// FULL-NEXT: [[DOTIMAGP2:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// FULL-NEXT: store float [[MUL_RL]], ptr [[DOTREALP1]], align 4 +// FULL-NEXT: store float [[MUL_IL]], ptr [[DOTIMAGP2]], align 4 +// FULL-NEXT: ret void +// +// BASIC-LABEL: define dso_local void @mulassignf( +// BASIC-SAME: ptr noundef [[A:%.*]], float noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] { +// BASIC-NEXT: [[ENTRY:.*:]] +// BASIC-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8 +// BASIC-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// BASIC-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8 +// BASIC-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// BASIC-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// BASIC-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8 +// BASIC-NEXT: [[DOTREALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// BASIC-NEXT: [[DOTREAL:%.*]] = load float, ptr [[DOTREALP]], align 4 +// BASIC-NEXT: [[DOTIMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// BASIC-NEXT: [[DOTIMAG:%.*]] = load float, ptr [[DOTIMAGP]], align 4 +// BASIC-NEXT: [[MUL_RL:%.*]] = fmul float [[DOTREAL]], [[TMP0]] +// BASIC-NEXT: [[MUL_IL:%.*]] = fmul float [[DOTIMAG]], [[TMP0]] +// BASIC-NEXT: [[DOTREALP1:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// BASIC-NEXT: [[DOTIMAGP2:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// BASIC-NEXT: store float [[MUL_RL]], ptr [[DOTREALP1]], align 4 +// BASIC-NEXT: store float [[MUL_IL]], ptr [[DOTIMAGP2]], align 4 +// BASIC-NEXT: ret void +// +// IMPRVD-LABEL: define dso_local void @mulassignf( +// IMPRVD-SAME: ptr noundef [[A:%.*]], float noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] { +// IMPRVD-NEXT: [[ENTRY:.*:]] +// IMPRVD-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8 +// IMPRVD-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// IMPRVD-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8 +// IMPRVD-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// IMPRVD-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// IMPRVD-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8 +// IMPRVD-NEXT: [[DOTREALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// IMPRVD-NEXT: [[DOTREAL:%.*]] = load float, ptr [[DOTREALP]], align 4 +// IMPRVD-NEXT: [[DOTIMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// IMPRVD-NEXT: [[DOTIMAG:%.*]] = load float, ptr [[DOTIMAGP]], align 4 +// IMPRVD-NEXT: [[MUL_RL:%.*]] = fmul float [[DOTREAL]], [[TMP0]] +// IMPRVD-NEXT: [[MUL_IL:%.*]] = fmul float [[DOTIMAG]], [[TMP0]] +// IMPRVD-NEXT: [[DOTREALP1:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// IMPRVD-NEXT: [[DOTIMAGP2:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// IMPRVD-NEXT: store float [[MUL_RL]], ptr [[DOTREALP1]], align 4 +// IMPRVD-NEXT: store float [[MUL_IL]], ptr [[DOTIMAGP2]], align 4 +// IMPRVD-NEXT: ret void +// +// PRMTD-LABEL: define dso_local void @mulassignf( +// PRMTD-SAME: ptr noundef [[A:%.*]], float noundef [[B:%.*]]) #[[ATTR1:[0-9]+]] { +// PRMTD-NEXT: [[ENTRY:.*:]] +// PRMTD-NEXT: [[A_ADDR:%.*]] = alloca ptr, align 8 +// PRMTD-NEXT: [[B_ADDR:%.*]] = alloca float, align 4 +// PRMTD-NEXT: store ptr [[A]], ptr [[A_ADDR]], align 8 +// PRMTD-NEXT: store float [[B]], ptr [[B_ADDR]], align 4 +// PRMTD-NEXT: [[TMP0:%.*]] = load float, ptr [[B_ADDR]], align 4 +// PRMTD-NEXT: [[TMP1:%.*]] = load ptr, ptr [[A_ADDR]], align 8 +// PRMTD-NEXT: [[DOTREALP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// PRMTD-NEXT: [[DOTREAL:%.*]] = load float, ptr [[DOTREALP]], align 4 +// PRMTD-NEXT: [[DOTIMAGP:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// PRMTD-NEXT: [[DOTIMAG:%.*]] = load float, ptr [[DOTIMAGP]], align 4 +// PRMTD-NEXT: [[MUL_RL:%.*]] = fmul float [[DOTREAL]], [[TMP0]] +// PRMTD-NEXT: [[MUL_IL:%.*]] = fmul float [[DOTIMAG]], [[TMP0]] +// PRMTD-NEXT: [[DOTREALP1:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 0 +// PRMTD-NEXT: [[DOTIMAGP2:%.*]] = getelementptr inbounds nuw { float, float }, ptr [[TMP1]], i32 0, i32 1 +// PRMTD-NEXT: store float [[MUL_RL]], ptr [[DOTREALP1]], align 4 +// PRMTD-NEXT:... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/131447 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits