1; RUN: llc -O2 -march=hexagon < %s | FileCheck %s
2
3define i32 @foo(i32 %x) {
4  %p = icmp eq i32 %x, 0
5  br i1 %p, label %zero, label %nonzero
6nonzero:
7  %v1 = add i32 %x, 1
8  %c = icmp eq i32 %x, %v1
9; This branch will be rewritten by HCP.  A bug would cause both branches to
10; go away, leaving no path to "ret -1".
11  br i1 %c, label %zero, label %other
12zero:
13  ret i32 0
14other:
15; CHECK: -1
16  ret i32 -1
17}
18