mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
6d31268a7d
to break up CFG diamonds by banishing one of the blocks to the end of the function, which is bad for code density and branch size. This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the benchmark cited as the reason for the change, however I've examined the code and it looks more like a case of gaming a particular branch than of being generally applicable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84803 91177308-0d34-0410-b5e6-96231b3b80d8
51 lines
1.1 KiB
LLVM
51 lines
1.1 KiB
LLVM
; RUN: llc < %s -march=x86 -o %t
|
|
; RUN: grep jb %t | count 1
|
|
; RUN: grep \\\$6 %t | count 2
|
|
; RUN: grep 1024 %t | count 1
|
|
; RUN: grep 1023 %t | count 1
|
|
; RUN: grep 119 %t | count 1
|
|
; RUN: grep JTI %t | count 2
|
|
; RUN: grep jg %t | count 3
|
|
; RUN: grep ja %t | count 1
|
|
; RUN: grep jns %t | count 1
|
|
|
|
target triple = "i686-pc-linux-gnu"
|
|
|
|
define i32 @main(i32 %tmp158) {
|
|
entry:
|
|
switch i32 %tmp158, label %bb336 [
|
|
i32 -2147483648, label %bb338
|
|
i32 -2147483647, label %bb338
|
|
i32 -2147483646, label %bb338
|
|
i32 120, label %bb338
|
|
i32 121, label %bb339
|
|
i32 122, label %bb340
|
|
i32 123, label %bb341
|
|
i32 124, label %bb342
|
|
i32 125, label %bb343
|
|
i32 126, label %bb336
|
|
i32 1024, label %bb338
|
|
i32 0, label %bb338
|
|
i32 1, label %bb338
|
|
i32 2, label %bb338
|
|
i32 3, label %bb338
|
|
i32 4, label %bb338
|
|
i32 5, label %bb338
|
|
]
|
|
bb336:
|
|
ret i32 10
|
|
bb338:
|
|
ret i32 11
|
|
bb339:
|
|
ret i32 12
|
|
bb340:
|
|
ret i32 13
|
|
bb341:
|
|
ret i32 14
|
|
bb342:
|
|
ret i32 15
|
|
bb343:
|
|
ret i32 18
|
|
|
|
}
|