2013-06-10 01:23:46 +02:00
|
|
|
; RUN: llc -march=mipsel -mcpu=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=cmp16
|
|
|
|
|
2013-06-22 21:35:08 +02:00
|
|
|
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64"
|
|
|
|
target triple = "mipsel--linux-gnu"
|
2013-06-10 01:23:46 +02:00
|
|
|
|
2013-06-22 21:35:08 +02:00
|
|
|
%struct.StorablePicture = type { i32, i32, i32, i32 }
|
2013-06-10 01:23:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-22 21:35:08 +02:00
|
|
|
define void @getSubImagesLuma(%struct.StorablePicture* nocapture %s) #0 {
|
2013-06-10 01:23:46 +02:00
|
|
|
entry:
|
2013-06-22 21:35:08 +02:00
|
|
|
%size_y = getelementptr inbounds %struct.StorablePicture* %s, i32 0, i32 1
|
2013-09-30 20:17:35 +02:00
|
|
|
%0 = load i32* %size_y, align 4
|
2013-06-22 21:35:08 +02:00
|
|
|
%sub = add nsw i32 %0, -1
|
|
|
|
%add5 = add nsw i32 %0, 20
|
|
|
|
%cmp6 = icmp sgt i32 %add5, -20
|
|
|
|
br i1 %cmp6, label %for.body, label %for.end
|
2013-06-10 01:23:46 +02:00
|
|
|
|
2013-06-22 21:35:08 +02:00
|
|
|
for.body: ; preds = %entry, %for.body
|
|
|
|
%j.07 = phi i32 [ %inc, %for.body ], [ -20, %entry ]
|
|
|
|
%call = tail call i32 bitcast (i32 (...)* @iClip3 to i32 (i32, i32, i32)*)(i32 0, i32 %sub, i32 %j.07) #2
|
|
|
|
%inc = add nsw i32 %j.07, 1
|
2013-09-30 20:17:35 +02:00
|
|
|
%1 = load i32* %size_y, align 4
|
2013-06-22 21:35:08 +02:00
|
|
|
%add = add nsw i32 %1, 20
|
|
|
|
%cmp = icmp slt i32 %inc, %add
|
|
|
|
br i1 %cmp, label %for.body, label %for.end
|
2013-06-10 01:23:46 +02:00
|
|
|
|
2013-06-22 21:35:08 +02:00
|
|
|
for.end: ; preds = %for.body, %entry
|
2013-06-10 01:23:46 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-06-22 21:35:08 +02:00
|
|
|
; cmp16: .ent getSubImagesLuma
|
|
|
|
; cmp16: .end getSubImagesLuma
|
|
|
|
declare i32 @iClip3(...) #1
|
2013-06-10 01:23:46 +02:00
|
|
|
|
2013-08-22 23:28:54 +02:00
|
|
|
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
|
|
|
attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
2013-06-22 21:35:08 +02:00
|
|
|
attributes #2 = { nounwind }
|