summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/pred-absolute-store.ll
blob: 1ed6bb2aacb77d0734578fc583591bbf2585c8ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; RUN: llc -march=hexagon < %s | FileCheck %s
; Check that we are able to predicate instructions with absolute
; addressing mode.
; CHECK: if ({{!?}}p{{[0-3]}}.new) memw(##gvar) = r{{[0-9]+}}

@gvar = external global i32
define i32 @test2(i32 %a, i32 %b) nounwind {
entry:
  %cmp = icmp eq i32 %a, %b
  br i1 %cmp, label %if.then, label %if.end

if.then:
  store i32 %a, i32* @gvar, align 4
  br label %if.end

if.end:
  ret i32 %b
}
OpenPOWER on IntegriCloud