annotate test/CodeGen/Hexagon/isel-op-zext-i1.ll @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: llc -march=hexagon -hexagon-expand-condsets=0 < %s | FileCheck %s
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 ; In the IR, the i1 value is zero-extended first, then passed to add.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; Check that in the final code, the mux happens after the add.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; CHECK: [[REG1:r[0-9]+]] = add([[REG0:r[0-9]+]],#1)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; CHECK: r{{[0-9]+}} = mux(p{{[0-3]}},[[REG1]],[[REG0]])
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 define i32 @foo(i32 %a, i32 %b) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9 %v0 = icmp eq i32 %a, %b
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 %v1 = zext i1 %v0 to i32
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11 %v2 = add i32 %v1, %a
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 ret i32 %v2
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 }