1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test/CodeGen/X86/opt-ext-uses.ll
Matthias Braun f7935a3f63 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

llvm-svn: 309774
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
}