1; RUN: llc < %s | FileCheck %s 2 3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-unknown-unknown" 5 6define void @PR22524({ float, float }* %arg) { 7; Check that we can materialize the zero constants we store in two places here, 8; and at least form a legal store of the floating point value at the end. 9; The DAG combiner at one point contained bugs that given enough permutations 10; would incorrectly form an illegal operation for the last of these stores when 11; it folded it to a zero too late to legalize the zero store operation. If this 12; ever starts forming a zero store instead of movss, the test case has stopped 13; being useful. 14; 15; CHECK-LABEL: PR22524: 16entry: 17 %0 = getelementptr inbounds { float, float }, { float, float }* %arg, i32 0, i32 1 18 store float 0.000000e+00, float* %0, align 4 19; CHECK: movl $0, 4(%rdi) 20 21 %1 = getelementptr inbounds { float, float }, { float, float }* %arg, i64 0, i32 0 22 %2 = bitcast float* %1 to i64* 23 %3 = load i64, i64* %2, align 8 24 %4 = trunc i64 %3 to i32 25 %5 = lshr i64 %3, 32 26 %6 = trunc i64 %5 to i32 27 %7 = bitcast i32 %6 to float 28 %8 = fmul float %7, 0.000000e+00 29 %9 = bitcast float* %1 to i32* 30 store i32 %6, i32* %9, align 4 31; CHECK: movl $0, (%rdi) 32 store float %8, float* %0, align 4 33; CHECK: movss %{{.*}}, 4(%rdi) 34 ret void 35} 36