1 # RUN: llc -march=aarch64 -run-pass=legalizer %s -o - -enable-cse-in-legalizer=1 -debug-only=cseinfo 2>&1 | FileCheck %s
2 # Test the -debug-only=cseinfo option here to make sure we're recording new instructions and printing the hit count
6 name: test_cse_in_legalizer
9 ; CHECK: CSEInfo::Add MI: %{{[0-9]+}}:_(s8) = G_TRUNC
10 ; CHECK: CSEInfo::Add MI: %{{[0-9]+}}:_(s32) = G_ZEXT
11 ; CHECK: CSEInfo::Add MI: %{{[0-9]+}}:_(s8) = G_TRUNC
12 ; CHECK: CSEInfo::Add MI: %{{[0-9]+}}:_(s32) = G_ZEXT
13 ; CHECK: CSEInfo::Recording new MI G_CONSTANT
14 ; CHECK: CSEInfo::Recording new MI G_CONSTANT
15 ; CHECK: CSEInfo::Recording new MI G_TRUNC
16 ; CHECK: CSEInfo::Recording new MI G_TRUNC
17 ; CHECK: CSEInfo::Recording new MI G_AND
18 ; CHECK: CSEInfo::Recording new MI G_AND
19 ; CHECK: CSEInfo::Found Instr %{{[0-9]+}}:_(s32) = G_CONSTANT
20 ; CHECK: CSEInfo::Found Instr %{{[0-9]+}}:_(s32) = G_TRUNC
21 ; CHECK: CSEInfo::Found Instr %{{[0-9]+}}:_(s32) = G_AND
22 ; CHECK: CSEInfo::CSE Hit for Opc {{[0-9]+}} : 1
23 ; CHECK: CSEInfo::CSE Hit for Opc {{[0-9]+}} : 1
24 ; CHECK: CSEInfo::CSE Hit for Opc {{[0-9]+}} : 1
26 %1:_(s8) = G_TRUNC %0(s64)
27 %19:_(s32) = G_ZEXT %1(s8)
29 %2:_(s8) = G_TRUNC %0(s64)
30 %20:_(s32) = G_ZEXT %2(s8)