Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc -o - %s | FileCheck %s
      2 ; Check that selection dag legalization of fcopysign works in cases with
      3 ; different modes for the arguments.
      4 target triple = "aarch64--"
      5 
      6 declare fp128 @llvm.copysign.f128(fp128, fp128)
      7 
      8 @val = global double zeroinitializer, align 8
      9 
     10 ; CHECK-LABEL: copysign0
     11 ; CHECK: ldr [[REG:x[0-9]+]], [x8, :lo12:val]
     12 ; CHECK: and [[ANDREG:x[0-9]+]], [[REG]], #0x8000000000000000
     13 ; CHECK: lsr x[[LSRREGNUM:[0-9]+]], [[ANDREG]], #56
     14 ; CHECK: bfxil w[[LSRREGNUM]], w{{[0-9]+}}, #0, #7
     15 ; CHECK: strb w[[LSRREGNUM]],
     16 ; CHECK: ldr q{{[0-9]+}},
     17 define fp128 @copysign0() {
     18 entry:
     19   %v = load double, double* @val, align 8
     20   %conv = fpext double %v to fp128
     21   %call = tail call fp128 @llvm.copysign.f128(fp128 0xL00000000000000007FFF000000000000, fp128 %conv) #2
     22   ret fp128 %call
     23 }
     24