; Pin: extractWide32Lo/Hi looks through REG_SEQUENCE shortcut. ; ; Without the shortcut, `*p = 0` (or any i32 store of a constant or ; freshly-built i32 vreg) hits the SDAG combiner repeatedly, the ; combiner re-merges and Custom-lower re-splits, the cycle runs for ; tens of seconds and 100MB+ peak. See feedback_extract_wide32_regseq_shortcut.md. ; ; Two functions: ; - clear_i32: simplest *(i32*)p = 0 case (the original repro) ; - clear_i32_pair: two adjacent i32 zero-stores (combiner stress) ; ; If the shortcut regresses, llc either OOMs (process killed) or ; takes >5s on these tiny functions. We assert on the lowered shape. ; ; RUN: llc -mtriple=w65816 -O2 -verify-machineinstrs < %s | FileCheck %s define void @clear_i32(ptr %p) { ; CHECK-LABEL: clear_i32: ; CHECK: sta [0xe0 ; CHECK: sta [0xe0 ; CHECK: rtl store i32 0, ptr %p ret void } define void @clear_i32_pair(ptr %p, ptr %q) { ; CHECK-LABEL: clear_i32_pair: ; CHECK: sta [0xe0 ; CHECK: sta [0xe0 ; CHECK: sta [0xe0 ; CHECK: sta [0xe0 ; CHECK: rtl store i32 0, ptr %p store i32 0, ptr %q ret void }