2020-01-16 20:37:25 +01:00
|
|
|
; REQUIRES: powerpc-registered-target
|
2020-01-16 21:07:50 +01:00
|
|
|
; RUN: llc -mtriple=powerpc-ibm-aix < %s 2>&1 >/dev/null | FileCheck --allow-empty %s
|
|
|
|
; RUN: llc -mtriple=powerpc-ibm-aix --relocation-model=pic < %s 2>&1 >/dev/null | FileCheck --allow-empty %s
|
|
|
|
; RUN: llc -mtriple=powerpc64-ibm-aix --relocation-model=pic < %s 2>&1 >/dev/null | FileCheck --allow-empty %s
|
[PowerPC][AIX] Make PIC the default relocation model for AIX
Summary:
The `llc` tool currently defaults to Static relocation model and generates non-relocatable code for 32-bit Power.
This is not desirable on AIX where we always generate Position Independent Code (PIC). This patch makes PIC the default relocation model for AIX.
Reviewers: daltenty, hubert.reinterpretcast, DiggerLin, Xiangling_L, sfertile
Reviewed By: hubert.reinterpretcast
Subscribers: mgorny, wuzish, nemanjai, hiraditya, kbarton, jsji, shchenz, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72479
2020-01-16 17:42:11 +01:00
|
|
|
; RUN: not llc -mtriple=powerpc-ibm-aix --relocation-model=static < %s 2>&1 | FileCheck --check-prefix=CHECK-NON-PIC %s
|
|
|
|
; RUN: not llc -mtriple=powerpc64-ibm-aix --relocation-model=ropi-rwpi < %s 2>&1 | FileCheck --check-prefix=CHECK-NON-PIC %s
|
|
|
|
|
|
|
|
; CHECK-NOT: {{.}}
|
2021-01-27 00:33:37 +01:00
|
|
|
; CHECK-NON-PIC: error: '<stdin>': invalid relocation model, AIX only supports PIC
|