Krzysztof Parzyszek | 18484de | 2018-03-06 19:15:58 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon -disable-hsdr -hexagon-bit=0 < %s | FileCheck %s |
Krzysztof Parzyszek | a72fad9 | 2017-02-10 15:33:13 +0000 | [diff] [blame] | 2 | ; CHECK: combine(r{{[0-9]+}},r{{[0-9]+}}) |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 3 | |
| 4 | @j = external global i32 |
| 5 | @k = external global i64 |
| 6 | |
| 7 | define void @foo() nounwind { |
| 8 | entry: |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 9 | %0 = load i32, i32* @j, align 4 |
| 10 | %1 = load i64, i64* @k, align 8 |
Tony Linthicum | 1213a7a | 2011-12-12 21:14:40 +0000 | [diff] [blame] | 11 | %conv = trunc i64 %1 to i32 |
| 12 | %2 = call i64 @llvm.hexagon.A2.combinew(i32 %0, i32 %conv) |
| 13 | store i64 %2, i64* @k, align 8 |
| 14 | ret void |
| 15 | } |
| 16 | |
| 17 | declare i64 @llvm.hexagon.A2.combinew(i32, i32) nounwind readnone |