Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
NEON conditional execution
Jump...
Cancel
Locked
Locked
Replies
10 replies
Subscribers
119 subscribers
Views
7503 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
NEON conditional execution
Laurent Ovaert
over 12 years ago
Note: This was originally posted on 17th February 2012 at
http://forums.arm.com
Hi, I would like to perform the following operation simultaneously on 8x16bits registers:
Q0 = Q0 + Q1
if (Q0 >= Q2) Q0 = Q3
I am not clear if this is possible to do that ?
In normal mode, I know it is since the mov can be conditional, but in SIMD I don't know.
Parents
Laurent Ovaert
over 12 years ago
Note: This was originally posted on 17th February 2012 at
http://forums.arm.com
Thank you Marcus, so is this the common way to do "conditional" execution, using the VBIT instruction ?
I can see all comparison instructions gives either all ones or all zeros, i was wondering what I could do with that, VBIT seems to make sense.
If i wanted to do:
[color=#222222][size=2]Q0 = Q0 + Q1[/size][/color]
[color=#222222][size=2]if (Q0 >= Q2) Q0 = Q0 - Q3[/size][/color]
[size=2]
[/size]
[size=2]Since there is no conditional instructions in SIMD mode, is the idea to always compute Q5=Q0-Q3 and then do the compare and use vbit to assign Q5 to Q0 via VBIT ?[/size]
[size=2]It seems not as efficient as if it was a true conditional execution, but I don't see any other way.[/size]
[size=2]
[/size]
[size=2]Is there some general guidelines or tricks on how to efficiently use the way the VCXX instructions work ?[/size]
[size=2]
[/size]
Cancel
Vote up
0
Vote down
Cancel
Reply
Laurent Ovaert
over 12 years ago
Note: This was originally posted on 17th February 2012 at
http://forums.arm.com
Thank you Marcus, so is this the common way to do "conditional" execution, using the VBIT instruction ?
I can see all comparison instructions gives either all ones or all zeros, i was wondering what I could do with that, VBIT seems to make sense.
If i wanted to do:
[color=#222222][size=2]Q0 = Q0 + Q1[/size][/color]
[color=#222222][size=2]if (Q0 >= Q2) Q0 = Q0 - Q3[/size][/color]
[size=2]
[/size]
[size=2]Since there is no conditional instructions in SIMD mode, is the idea to always compute Q5=Q0-Q3 and then do the compare and use vbit to assign Q5 to Q0 via VBIT ?[/size]
[size=2]It seems not as efficient as if it was a true conditional execution, but I don't see any other way.[/size]
[size=2]
[/size]
[size=2]Is there some general guidelines or tricks on how to efficiently use the way the VCXX instructions work ?[/size]
[size=2]
[/size]
Cancel
Vote up
0
Vote down
Cancel
Children
No data