zig icon indicating copy to clipboard operation
zig copied to clipboard

LLVM backend does not implement reduce on f128 Vector

Open Traxar opened this issue 1 year ago • 0 comments

Zig Version

0.13.0

Steps to Reproduce and Observed Behavior

const V = @Vector(1,f128);

pub inline fn foo(b: V) f128 {  // removing inline changes crash message
    return @reduce(.Mul, b); //reduction operation does not matter
}

test "float simd" {
	var a: V = undefined ;//making this const makes it not crash
	a[0] = 0;
	const b: V = a + a;

	_ = foo(b);//commenting this out makes in not crash
	//_ = @reduce(.Max, b);//calling reduce directly instead makes it not fail
}

output:

error: Assigned value does not match type of forward declaration

Expected Behavior

no crash

Traxar avatar Jul 09 '24 20:07 Traxar