1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown-unknown -mcpu=generic -mattr=+avx < %s | FileCheck %s
4 ; When commuting a VADDSDrr instruction, verify that the 'IsUndef' flag is
5 ; correctly propagated to the operands of the resulting instruction.
8 declare zeroext i1 @foo(<1 x double>)
10 define <1 x double> @pr23103(ptr align 8 %Vp) {
11 ; CHECK-LABEL: pr23103:
12 ; CHECK: # %bb.0: # %entry
13 ; CHECK-NEXT: pushq %rax
14 ; CHECK-NEXT: .cfi_def_cfa_offset 16
15 ; CHECK-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
16 ; CHECK-NEXT: callq foo@PLT
17 ; CHECK-NEXT: vmovsd {{.*#+}} xmm0 = [NaN,0.0E+0]
18 ; CHECK-NEXT: popq %rax
19 ; CHECK-NEXT: .cfi_def_cfa_offset 8
22 %V = load <1 x double>, ptr %Vp, align 8
23 %call = call zeroext i1 @foo(<1 x double> %V)
24 %fadd = fadd <1 x double> %V, undef
25 ret <1 x double> %fadd