-fccmp2
This option optimizes the Arm instruction set. It extends the application scenarios of the ccmp instruction and simplifies the instruction pipeline.
For the following code scenario:
1 2 3 4 5 6 7 8 9 10 | int f(int a, int b, int c) { while(1) { if (a--==0||b>=c ) { return 1; } } } |
After the ccmp instruction is successfully enabled, the following assembly code is generated.
Figure 1 Assembly containing the ccmp instruction


Usage
Add the compilation option -fccmp2.
Optimization effect: Approximately 1% performance improvement is observed on the SPEC CPU 2017 intrate 557.xz_r benchmark.
Parent topic: Static Compilation Optimization