1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/CodeGen/PowerPC/2008-03-24-AddressRegImm.ll
Matthias Braun b3a8585bc1 PowerPC: 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.

This patch:
- Removes -march if the .ll file already has a matching `target triple`
  directive or -mtriple argument.
- In all other cases changes -march=ppc32/-march=ppc64 to
  -mtriple=ppc32--/-mtriple=ppc64--

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

llvm-svn: 309754
2017-08-01 22:20:41 +00:00

26 lines
937 B
LLVM

; RUN: llc -verify-machineinstrs < %s -mtriple=ppc64--
define fastcc i8* @page_rec_get_next(i8* %rec) nounwind {
entry:
%tmp2627 = ptrtoint i8* %rec to i64 ; <i64> [#uses=2]
%tmp28 = and i64 %tmp2627, -16384 ; <i64> [#uses=2]
%tmp2829 = inttoptr i64 %tmp28 to i8* ; <i8*> [#uses=1]
%tmp37 = getelementptr i8, i8* %tmp2829, i64 42 ; <i8*> [#uses=1]
%tmp40 = load i8, i8* %tmp37, align 1 ; <i8> [#uses=1]
%tmp4041 = zext i8 %tmp40 to i64 ; <i64> [#uses=1]
%tmp42 = shl i64 %tmp4041, 8 ; <i64> [#uses=1]
%tmp47 = add i64 %tmp42, 0 ; <i64> [#uses=1]
%tmp52 = and i64 %tmp47, 32768 ; <i64> [#uses=1]
%tmp72 = icmp eq i64 %tmp52, 0 ; <i1> [#uses=1]
br i1 %tmp72, label %bb91, label %bb
bb: ; preds = %entry
ret i8* null
bb91: ; preds = %entry
br i1 false, label %bb100, label %bb185
bb100: ; preds = %bb91
%tmp106 = sub i64 %tmp2627, %tmp28 ; <i64> [#uses=0]
ret i8* null
bb185: ; preds = %bb91
ret i8* null
}