1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/Hexagon/peephole-kill-flags.ll
Krzysztof Parzyszek db3c93e416 [Hexagon] Simplify CFG after atomic expansion
This will remove suboptimal branching from the generated ll/sc loops.
The extra simplification pass affects a lot of testcases, which have
been modified to accommodate this change: either by modifying the
test to become immune to the CFG simplification, or (less preferablt)
by adding option -hexagon-initial-cfg-clenaup=0.

llvm-svn: 338774
2018-08-02 22:17:53 +00:00

27 lines
693 B
LLVM

; RUN: llc -march=hexagon -verify-machineinstrs < %s | FileCheck %s
; CHECK: memw
; Check that the testcase compiles without errors.
target triple = "hexagon"
; Function Attrs: nounwind
define i32 @f0(i32* %a0, i32 %a1) #0 {
b0:
br label %b1
b1: ; preds = %b0
%v0 = load i32, i32* %a0, align 4
%v1 = mul nsw i32 2, %v0
%v2 = icmp slt i32 %a1, %v1
br i1 %v2, label %b2, label %b3
b2: ; preds = %b1
ret i32 0
b3: ; preds = %b1
ret i32 %v1
}
attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }