2016-10-05 19:40:27 +02:00
|
|
|
; RUN: llc -march=sparc < %s | FileCheck %s
|
|
|
|
|
|
|
|
|
|
|
|
; If computeKnownSignBits (in SelectionDAG) can do a simple
|
2018-04-13 13:37:06 +02:00
|
|
|
; look-thru for extractelement then we know that the add will yield a
|
2016-10-05 19:40:27 +02:00
|
|
|
; non-negative result.
|
|
|
|
define i1 @test1(<4 x i16>* %in) {
|
2017-12-04 18:18:51 +01:00
|
|
|
; CHECK-LABEL: ! %bb.0:
|
2016-10-05 19:40:27 +02:00
|
|
|
; CHECK-NEXT: retl
|
2018-04-20 09:47:12 +02:00
|
|
|
; CHECK-NEXT: mov %g0, %o0
|
2016-10-05 19:40:27 +02:00
|
|
|
%vec2 = load <4 x i16>, <4 x i16>* %in, align 1
|
|
|
|
%vec3 = lshr <4 x i16> %vec2, <i16 2, i16 2, i16 2, i16 2>
|
|
|
|
%vec4 = sext <4 x i16> %vec3 to <4 x i32>
|
|
|
|
%elt0 = extractelement <4 x i32> %vec4, i32 0
|
|
|
|
%elt1 = extractelement <4 x i32> %vec4, i32 1
|
|
|
|
%sum = add i32 %elt0, %elt1
|
|
|
|
%bool = icmp slt i32 %sum, 0
|
|
|
|
ret i1 %bool
|
|
|
|
}
|