vcmpgefp.
Vector Compare Greater Than or Equal Floating-Point
vcmpgefp. VRT, VRA, VRB
Compares the elements of two vector registers and sets the result in a third vector register based on whether each element is greater than or equal to the corresponding element in the other vector.
Encoding
Binary Layout
000100
0:5
VRT
6:10
VRA
11:15
VRB
16:20
.0111
21:30
000110
31
Operands
-
VRT
Target Vector Register -
VRA
Source Vector Register A -
VRB
Source Vector Register B
Example
vcmpgefp. v1, v2, v3
Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The vcmpgefp. instruction compares corresponding single-precision floating-point elements of vector registers VRA and VRB. For each of the four 32-bit floating-point elements, if the element in VRA is greater than or equal to the corresponding element in VRB, the corresponding element in VRT is set to all 1s (0xFFFFFFFF); otherwise, it is set to all 0s (0x00000000). The dot form (vcmpgefp.) additionally updates the CR6 field of the Condition Register to reflect whether all elements, some elements, or no elements satisfied the comparison.
Operation
for i = 0 to 7 do
if (VRA[i] >= VRB[i]) then
VRT[i] <- 1
else
VRT[i] <- 0
end if
end for
Programming Note
Use vcmpgefp. to compare four single-precision floating-point elements in two vector registers. Ensure both input vectors are properly aligned and initialized. The dot form updates CR6, indicating the comparison results, which can be useful for conditional branching.