xref: /aosp_15_r20/external/llvm/test/CodeGen/MIR/X86/invalid-constant-pool-item.mir (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker# This test ensures that the MIR parser reports an error when parsing an invalid
3*9880d681SAndroid Build Coastguard Worker# constant pool item operand.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker--- |
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker  define double @test(double %a, float %b) {
8*9880d681SAndroid Build Coastguard Worker  entry:
9*9880d681SAndroid Build Coastguard Worker    %c = fadd double %a, 3.250000e+00
10*9880d681SAndroid Build Coastguard Worker    ret double %c
11*9880d681SAndroid Build Coastguard Worker  }
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker...
14*9880d681SAndroid Build Coastguard Worker---
15*9880d681SAndroid Build Coastguard Workername:            test
16*9880d681SAndroid Build Coastguard Workerconstants:
17*9880d681SAndroid Build Coastguard Worker  - id:          0
18*9880d681SAndroid Build Coastguard Worker    value:       'double 3.250000e+00'
19*9880d681SAndroid Build Coastguard Workerbody: |
20*9880d681SAndroid Build Coastguard Worker  bb.0.entry:
21*9880d681SAndroid Build Coastguard Worker    ; CHECK: [[@LINE+1]]:47: use of undefined constant '%const.10'
22*9880d681SAndroid Build Coastguard Worker    %xmm0 = ADDSDrm killed %xmm0, %rip, 1, _, %const.10, _
23*9880d681SAndroid Build Coastguard Worker    RETQ %xmm0
24*9880d681SAndroid Build Coastguard Worker...
25*9880d681SAndroid Build Coastguard Worker
26