blob: d696800671acdea9cd396fc6f65c251960d8e6b8 [file] [log] [blame]
Krzysztof Parzyszek1b7197e2017-03-08 15:46:28 +00001; RUN: llc -march=hexagon < %s | FileCheck %s
2; CHECK: extractu(r1,#31,#0)
3
4; In the IR this was an extract of 31 bits starting at position 32 in r1:0.
5; When mapping it to an extract from r1, the offset was not reset to 0, and
6; we had "extractu(r1,#31,#32)".
7
8target triple = "hexagon"
9
Krzysztof Parzyszekd91a9e22018-08-02 22:17:53 +000010@g0 = global double zeroinitializer, align 8
11
Krzysztof Parzyszek1b7197e2017-03-08 15:46:28 +000012define hidden i32 @fred([101 x double]* %a0, i32 %a1, i32* %a2, i32* %a3) #0 {
13b4:
14 br label %b5
15
16b5: ; preds = %b5, %b4
17 %v6 = call double @fabs(double undef) #1
Krzysztof Parzyszekd91a9e22018-08-02 22:17:53 +000018 store double %v6, double* @g0, align 8
Krzysztof Parzyszek1b7197e2017-03-08 15:46:28 +000019 br label %b5
20}
21
22declare double @fabs(double) #1
23
Sumanth Gundapanenie1983bc2017-10-18 18:07:07 +000024attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" }
25attributes #1 = { nounwind readnone "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" }