
The issue is uncovered by #47698: for IR files without a target triple, -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple, leaving a target triple which may not make sense, e.g. riscv64-apple-darwin. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it outrightly.
24 lines
590 B
LLVM
24 lines
590 B
LLVM
; RUN: llc -mtriple=mipsel -mcpu=mips32r2 -O0 -fast-isel=true -filetype=obj %s -o - \
|
|
; RUN: | llvm-objdump -d - | FileCheck %s
|
|
|
|
; This test checks that encoding for srl is correct when fast-isel for mips32r2 is used.
|
|
|
|
%struct.s = type { [4 x i8], i32 }
|
|
|
|
define i32 @main() nounwind uwtable {
|
|
entry:
|
|
%foo = alloca %struct.s, align 4
|
|
%bf.load = load i32, ptr %foo, align 4
|
|
%bf.lshr = lshr i32 %bf.load, 2
|
|
%cmp = icmp ne i32 %bf.lshr, 2
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then:
|
|
unreachable
|
|
|
|
if.end:
|
|
ret i32 0
|
|
}
|
|
|
|
; CHECK: srl ${{[0-9]+}}, ${{[0-9]+}}, {{[0-9]+}}
|