Skip to content

Superfluous instructions when using _mm_set_ss with -ffp-model=strict on x86_64 #104848

Closed
@jerryct

Description

@jerryct

When using the intrinics _mm_set_ss with -ffp-model=strict compiler flag
Clang generates two seemingly unrelated instructions (neither eax nor xmm1 are used by andps)

        xor     eax, eax
        cvtsi2ss        xmm1, eax
        andps   xmm0, xmmword ptr [rip + .LCPI1_0]

reproducer: https://godbolt.org/z/3fj6ob345

For example when switching to _mm_load_ps1 instead the instructions
are not generated: https://godbolt.org/z/8G6vGEjxE

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions