llvm/test/CodeGen/X86/opt-ext-uses.ll
Matthias Braun 3a6f6d93bf X86: Do not use llc -march in tests.
`llc -march` is problematic because it only switches the target
architecture, but leaves the operating system unchanged. This
occasionally leads to indeterministic tests because the OS from
LLVM_DEFAULT_TARGET_TRIPLE is used.

However we can simply always use `llc -mtriple` instead. This changes
all the tests to do this to avoid people using -march when they copy and
paste parts of tests.

See also the discussion in https://reviews.llvm.org/D35287

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309774 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02 00:28:10 +00:00

26 lines
868 B
LLVM

; RUN: llc < %s -mtriple=i686-- | FileCheck %s
; This test should get one and only one register to register mov.
; CHECK-LABEL: t:
; CHECK: movl
; CHECK-NOT: mov
; CHECK: ret
define signext i16 @t() {
entry:
%tmp180 = load i16, i16* null, align 2 ; <i16> [#uses=3]
%tmp180181 = sext i16 %tmp180 to i32 ; <i32> [#uses=1]
%tmp182 = add i16 %tmp180, 10
%tmp185 = icmp slt i16 %tmp182, 0 ; <i1> [#uses=1]
br i1 %tmp185, label %cond_true188, label %cond_next245
cond_true188: ; preds = %entry
%tmp195196 = trunc i16 %tmp180 to i8 ; <i8> [#uses=0]
ret i16 %tmp180
cond_next245: ; preds = %entry
%tmp256 = and i32 %tmp180181, 15 ; <i32> [#uses=0]
%tmp3 = trunc i32 %tmp256 to i16
ret i16 %tmp3
}