llvm-project/llvm/test/CodeGen/WebAssembly/GlobalISel/gisel-commandline-option.ll
Marina Taylor 55322f2d43
[ObjCARC] Run ObjCARCContract before PreISelIntrinsicLowering (#184149)
74e4694 moved ObjCARCContract from running before the codegen pipeline
into addISelPrepare(), which runs after PreISelIntrinsicLowering.

This broke ObjCARCContract's retainRV-to-claimRV optimization because
ObjCARCContract identifies ARC calls via intrinsics, not their lowered
counterparts.

This patch restores the pre-74e4694 ordering by moving ObjCARCContract
to addISelPasses.

The IntrinsicInst.cpp change looks extraneous but is required here:
ObjCARCContract may now rewrite the bundle operand from retainRV to
claimRV. When PreISelIntrinsicLowering then encounters this new
intrinsic use, lowerObjCCall asserts mayLowerToFunctionCall.

Assisted-by: claude

rdar://137997453
2026-03-27 15:37:47 +00:00

55 lines
2.2 KiB
LLVM

; RUN: llc -mtriple=wasm32-- -debug-pass=Structure %s -o /dev/null 2>&1 \
; RUN: -verify-machineinstrs=0 -O0 -global-isel \
; RUN: | FileCheck %s --check-prefixes=ENABLED,NOFALLBACK,ENABLED-O0
; RUN: llc -mtriple=wasm32-- -debug-pass=Structure %s -o /dev/null 2>&1 \
; RUN: -verify-machineinstrs=0 -global-isel \
; RUN: | FileCheck %s --check-prefixes=ENABLED,NOFALLBACK,ENABLED-O1
; RUN: llc -mtriple=wasm32-- -debug-pass=Structure %s -o /dev/null 2>&1 \
; RUN: -verify-machineinstrs=0 -global-isel -global-isel-abort=2 \
; RUN: | FileCheck %s --check-prefixes=ENABLED,FALLBACK,ENABLED-O1
; RUN: llc -mtriple=wasm32-- -debug-pass=Structure %s -o /dev/null 2>&1 \
; RUN: -verify-machineinstrs=0 \
; RUN: | FileCheck %s --check-prefixes=DISABLED
; ENABLED: IRTranslator
; ENABLED-O0-NEXT: Analysis containing CSE Info
; ENABLED-NEXT: Analysis for ComputingKnownBits
; ENABLED-O1-NEXT: MachineDominator Tree Construction
; ENABLED-O1-NEXT: Analysis containing CSE Info
; ENABLED-O1-NEXT: WebAssemblyPreLegalizerCombiner
; ENABLED-NEXT: Legalizer
; ENABLED-O1-NEXT: MachineDominator Tree Construction
; ENABLED-O1-NEXT: WebAssemblyPostLegalizerCombiner
; ENABLED-NEXT: RegBankSelect
; ENABLED-NEXT: Analysis for ComputingKnownBits
; ENABLED-O1-NEXT: Dominator Tree Construction
; ENABLED-O1-NEXT: Natural Loop Information
; ENABLED-O1-NEXT: Lazy Branch Probability Analysis
; ENABLED-O1-NEXT: Lazy Block Frequency Analysis
; ENABLED-NEXT: InstructionSelect
; NOFALLBACK-NEXT: WebAssembly Argument Move
; NOFALLBACK-NEXT: WebAssembly Set p2align Operands
; NOFALLBACK-NEXT: WebAssembly Fix br_table Defaults
; NOFALLBACK-NEXT: WebAssembly Clean Code After Trap
; ENABLED-NEXT: ResetMachineFunction
; FALLBACK: WebAssembly Instruction Selection
; FALLBACK-NEXT: WebAssembly Argument Move
; FALLBACK-NEXT: WebAssembly Set p2align Operands
; FALLBACK-NEXT: WebAssembly Fix br_table Defaults
; FALLBACK-NEXT: WebAssembly Clean Code After Trap
; NOFALLBACK-NOT: WebAssembly Instruction Selection
; DISABLED-NOT: IRTranslator
; DISABLED: WebAssembly Instruction Selection
; DISABLED: Finalize ISel and expand pseudo-instructions
define void @empty() {
ret void
}