Files
clang-p2996/bolt/test/X86/Inputs/linenumber.cpp
Amir Ayupov d41b4e6e2d [BOLT][TEST] Imported small tests
Summary:
Imported small internal tests:
- keep_aranges.test
- layout_heuristic.test
- line_number.test
- block_reordering.test
- branch_data.test
- reader.test

(cherry picked from FBD31486371)
2021-10-07 13:38:58 -07:00

26 lines
402 B
C++

int f() {
// This will be removed by BOLT but they make sure we have some extra space
// to insert branches and don't run out of space when rewritting the function.
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
int x = 0xBEEF;
if (x & 0x32) {
x++;
} else {
--x;
}
return x;
}
int g() {
return f() + 1;
}
int main() {
int q = g() * f();
return 0;
}