
12 bit is not enough for PPC's target specific flags. If 8 bit for the bitmask flags, 4 bit for the direct mask, PPC can total have 16 direct mask and 8 bitmask. Not enough for PPC, see this issue in https://github.com/llvm/llvm-project/pull/66316 Redesign how PPC target set the target specific flags. With this patch, all ppc target flags are direct flags. No bitmask flag in PPC anymore. This patch aligns with some targets like X86 which also has many target specific flags. The patch also fixes a bug related to flag `MO_TLSGDM_FLAG` and `MO_LO`. They are the same value and the test case changes in this PR shows the bug.
26 lines
934 B
YAML
26 lines
934 B
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 -relocation-model=pic -run-pass=ppc-tls-dynamic-call,pipeliner -verify-machineinstrs %s -o - | FileCheck %s
|
|
|
|
# Just check that MachineVerifier does not fail due to PPCTLSDynamicCall failing
|
|
# to preserve some analyses.
|
|
# CHECK: name: test
|
|
|
|
--- |
|
|
%0 = type { i32 (...)**, %0* }
|
|
@x = external dso_local thread_local unnamed_addr global %0*, align 8
|
|
define void @test(i8* %arg) { ret void }
|
|
...
|
|
---
|
|
name: test
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
liveins: $x3
|
|
|
|
%0:g8rc = COPY killed $x3
|
|
%1:g8rc_and_g8rc_nox0 = PADDI8pc 0, target-flags(ppc-got-tlsld-pcrel) @x
|
|
%2:g8rc_and_g8rc_nox0 = PADDIdtprel killed %1, target-flags(ppc-got-tlsld-pcrel) @x
|
|
STD killed %0, 0, killed %2 :: (store (s64) into `i8** bitcast (%0** @x to i8**)`)
|
|
BLR8 implicit $lr8, implicit $rm
|
|
...
|