Skip to content

Regression in codegen-llvm test riscv-abi/call-llvm-intrinsics.rs on riscv64 since 1.94-beta #153271

@DeepeshWR

Description

@DeepeshWR

The test tests/codegen-llvm/riscv-abi/call-llvm-intrinsics.rs started failing on riscv64 from rustc 1.94.0-beta.

It was passing with rustc 1.93.0.

The failure occurs because FileCheck no longer finds the expected store instruction in the generated LLVM IR.

1.93 (passing) :

store float 4.000000e+00, ptr %3, align 4
%5 = call float @llvm.sqrt.f32(float %4)

1.94-beta (failing) :

%_2 = call float @llvm.sqrt.f32(float 4.000000e+00)

In 1.94.0-beta, the constant 4.0 is passed directly to llvm.sqrt.f32, and the intermediate store (and corresponding load) are no longer emitted, causing the CHECK pattern to fail.

I have attached the following files for reference :

call-llvm-intrinsics-1.93.0.ll

call-llvm-intrinsics-1.94.0.ll

Backtrace.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-riscvTarget: RISC-V architectureT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions