
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple (e.g. Windows, macOS), leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize sparc*-apple-darwin as ELF instead of rejecting it outrightly.
20 lines
635 B
LLVM
20 lines
635 B
LLVM
; RUN: llc -mtriple=sparc < %s | FileCheck %s
|
|
|
|
|
|
; If computeKnownSignBits (in SelectionDAG) can do a simple
|
|
; look-thru for extractelement then we know that the add will yield a
|
|
; non-negative result.
|
|
define i1 @test1(ptr %in) {
|
|
; CHECK-LABEL: ! %bb.0:
|
|
; CHECK-NEXT: retl
|
|
; CHECK-NEXT: mov %g0, %o0
|
|
%vec2 = load <4 x i16>, ptr %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
|
|
}
|