mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
This is not just a matter of passing in the target triple from the module; currently backends are making decisions based on the build and host architecture. The goal is to migrate to making these decisions based off of the triple (in conjunction with the feature string). Thus most clients pass in the target triple, or the host triple if that is empty. This has one important change in the way behavior of the JIT and llc. For the JIT, it was previously selecting the Target based on the host (naturally), but it was setting the target machine features based on the triple from the module. Now it is setting the target machine features based on the triple of the host. For LLC, -march was previously only used to select the target, the target machine features were initialized from the module's triple (which may have been empty). Now the target triple is taken from the module, or the host's triple is used if that is empty. Then the triple is adjusted to match -march. The take away is that -march for llc is now used in conjunction with the host triple to initialize the subtarget. If users want more deterministic behavior from llc, they should use -mtriple, or set the triple in the input module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77946 91177308-0d34-0410-b5e6-96231b3b80d8
48 lines
1.5 KiB
LLVM
48 lines
1.5 KiB
LLVM
; RUN: llvm-as < %s | llc | not grep rep
|
|
; RUN: llvm-as < %s | llc | grep memset
|
|
|
|
target triple = "i386"
|
|
|
|
declare void @llvm.memset.i32(i8*, i8, i32, i32) nounwind
|
|
|
|
define fastcc i32 @cli_scanzip(i32 %desc) nounwind {
|
|
entry:
|
|
br label %bb8.i.i.i.i
|
|
|
|
bb8.i.i.i.i: ; preds = %bb8.i.i.i.i, %entry
|
|
icmp eq i32 0, 0 ; <i1>:0 [#uses=1]
|
|
br i1 %0, label %bb61.i.i.i, label %bb8.i.i.i.i
|
|
|
|
bb32.i.i.i: ; preds = %bb61.i.i.i
|
|
ptrtoint i8* %tail.0.i.i.i to i32 ; <i32>:1 [#uses=1]
|
|
sub i32 0, %1 ; <i32>:2 [#uses=1]
|
|
icmp sgt i32 %2, 19 ; <i1>:3 [#uses=1]
|
|
br i1 %3, label %bb34.i.i.i, label %bb61.i.i.i
|
|
|
|
bb34.i.i.i: ; preds = %bb32.i.i.i
|
|
load i32* null, align 4 ; <i32>:4 [#uses=1]
|
|
icmp eq i32 %4, 101010256 ; <i1>:5 [#uses=1]
|
|
br i1 %5, label %bb8.i11.i.i.i, label %bb61.i.i.i
|
|
|
|
bb8.i11.i.i.i: ; preds = %bb8.i11.i.i.i, %bb34.i.i.i
|
|
icmp eq i32 0, 0 ; <i1>:6 [#uses=1]
|
|
br i1 %6, label %cli_dbgmsg.exit49.i, label %bb8.i11.i.i.i
|
|
|
|
cli_dbgmsg.exit49.i: ; preds = %bb8.i11.i.i.i
|
|
icmp eq [32768 x i8]* null, null ; <i1>:7 [#uses=1]
|
|
br i1 %7, label %bb1.i28.i, label %bb8.i.i
|
|
|
|
bb61.i.i.i: ; preds = %bb61.i.i.i, %bb34.i.i.i, %bb32.i.i.i, %bb8.i.i.i.i
|
|
%tail.0.i.i.i = getelementptr [1024 x i8]* null, i32 0, i32 0 ; <i8*> [#uses=2]
|
|
load i8* %tail.0.i.i.i, align 1 ; <i8>:8 [#uses=1]
|
|
icmp eq i8 %8, 80 ; <i1>:9 [#uses=1]
|
|
br i1 %9, label %bb32.i.i.i, label %bb61.i.i.i
|
|
|
|
bb1.i28.i: ; preds = %cli_dbgmsg.exit49.i
|
|
call void @llvm.memset.i32( i8* null, i8 0, i32 88, i32 1 ) nounwind
|
|
unreachable
|
|
|
|
bb8.i.i: ; preds = %bb8.i.i, %cli_dbgmsg.exit49.i
|
|
br label %bb8.i.i
|
|
}
|