aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/select.zig
AgeCommit message (Collapse)Author
2022-03-25sema: coerce inputs to vectors in zirSelectJohn Schmidt
2022-03-25stage2: implement `@select`John Schmidt
2022-03-23behavior tests: disable failing stage1 testAndrew Kelley
My previous commit added a new behavior test that passes for stage2 but I forgot to check whether it passes for stage1. Since it does not, it has to be disabled. Additionally, this commit organizes behavior tests; there is no longer a section of tests only passing for stage1. Instead, tests are disabled on an individual basis. There is an except for the file which has global assembly in it.
2021-07-26Add @selectRobin Voetter
@select( comptime T: type, pred: std.meta.Vector(len, bool), a: std.meta.Vector(len, T), b: std.meta.Vector(len, T) ) std.meta.Vector(len, T) Constructs a vector from a & b, based on the values in the predicate vector. For indices where the predicate value is true, the corresponding element from the a vector is selected, and otherwise from b.