Jyotsna Verma | 978e972 | 2013-05-09 18:25:44 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s |
| 2 | ; Check that we are able to predicate instructions. |
| 3 | |
| 4 | ; CHECK: if{{ *}}({{!*}}p{{[0-3]}}{{[.new]*}}){{ *}}r{{[0-9]+}}{{ *}}={{ *}}{{and|aslh}} |
| 5 | ; CHECK: if{{ *}}({{!*}}p{{[0-3]}}{{[.new]*}}){{ *}}r{{[0-9]+}}{{ *}}={{ *}}{{and|aslh}} |
| 6 | @a = external global i32 |
| 7 | @d = external global i32 |
| 8 | |
| 9 | ; Function Attrs: nounwind |
| 10 | define i32 @test1(i8 zeroext %la, i8 zeroext %lb) { |
| 11 | entry: |
| 12 | %cmp = icmp eq i8 %la, %lb |
| 13 | br i1 %cmp, label %if.then, label %if.else |
| 14 | |
| 15 | if.then: ; preds = %entry |
| 16 | %conv1 = zext i8 %la to i32 |
| 17 | %shl = shl nuw nsw i32 %conv1, 16 |
| 18 | br label %if.end |
| 19 | |
| 20 | if.else: ; preds = %entry |
| 21 | %and8 = and i8 %lb, %la |
| 22 | %and = zext i8 %and8 to i32 |
| 23 | br label %if.end |
| 24 | |
| 25 | if.end: ; preds = %if.else, %if.then |
| 26 | %storemerge = phi i32 [ %and, %if.else ], [ %shl, %if.then ] |
| 27 | store i32 %storemerge, i32* @a, align 4 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 28 | %0 = load i32, i32* @d, align 4 |
Jyotsna Verma | 978e972 | 2013-05-09 18:25:44 +0000 | [diff] [blame] | 29 | ret i32 %0 |
| 30 | } |