@@ -839,17 +839,9 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
839
839
840
840
if (opKind(op, VO_SPECIAL {#if[!FP]? | VO_SHIFT})) {
841
841
if (op == FIRST_NONZERO) {
842
- // FIXME: Support this in the JIT.
843
- VectorMask<$Boxbitstype$> thisNZ
844
- = this.viewAsIntegralLanes().compare(NE, ($bitstype$) 0);
845
- that = that.blend(($type$) 0, thisNZ.cast(vspecies()));
846
- op = OR_UNCHECKED;
847
- #if[FP]
848
- // FIXME: Support OR_UNCHECKED on float/double also!
849
- return this.viewAsIntegralLanes()
850
- .lanewise(op, that.viewAsIntegralLanes())
851
- .viewAsFloatingLanes();
852
- #end[FP]
842
+ VectorMask<$Boxbitstype$> mask
843
+ = this{#if[FP]?.viewAsIntegralLanes()}.compare(EQ, ($bitstype$) 0);
844
+ return this.blend(that, mask{#if[FP]?.cast(vspecies())});
853
845
}
854
846
#if[BITWISE]
855
847
#if[!FP]
@@ -900,13 +892,14 @@ public abstract class $abstractvectortype$ extends AbstractVector<$Boxtype$> {
900
892
if (opKind(op, VO_SPECIAL {#if[!FP]? | VO_SHIFT})) {
901
893
if (op == FIRST_NONZERO) {
902
894
#if[FP]
903
- return blend(lanewise(op, v), m);
895
+ $Bitstype$Vector bits = this.viewAsIntegralLanes();
896
+ VectorMask<$Boxbitstype$> mask
897
+ = bits.compare(EQ, ($bitstype$) 0, m.cast(bits.vspecies()));
898
+ return this.blend(that, mask.cast(vspecies()));
904
899
#else[FP]
905
- // FIXME: Support this in the JIT.
906
- VectorMask<$Boxbitstype$> thisNZ
907
- = this.viewAsIntegralLanes().compare(NE, ($bitstype$) 0);
908
- that = that.blend(($type$) 0, thisNZ.cast(vspecies()));
909
- op = OR_UNCHECKED;
900
+ VectorMask<$Boxtype$> mask
901
+ = this.compare(EQ, ($type$) 0, m);
902
+ return this.blend(that, mask);
910
903
#end[FP]
911
904
}
912
905
#if[BITWISE]
0 commit comments