Skip to content

equalMask with void initialized vector broken for optimized builds #5180

Description

@FinalEvilution

Compiling this with -O produces a mask of zeros, while for an unoptimized build it works correctly.
Tested with ldc master and ldc2-1.42.0-linux-x86_64
https://godbolt.org/z/b5b43onGb

import std.stdio;
import ldc.simd;
import core.simd;

void main()
{
	int8 mask = void;
	writeln(cast(int[8]) mask.array);
	mask  = equalMask!int8(mask, mask);
	writeln(cast(int[8]) mask.array);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions