1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefixes=CHECK,X86
3 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=CHECK,X64
5 define i32 @fold_add_freeze_i32() {
6 ; CHECK-LABEL: fold_add_freeze_i32:
8 ; CHECK-NEXT: movl $-1, %eax
9 ; CHECK-NEXT: ret{{[l|q]}}
18 define <4 x i32> @fold_add_freeze_v4i32() {
19 ; X86-LABEL: fold_add_freeze_v4i32:
21 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
22 ; X86-NEXT: movl $-1, 12(%eax)
23 ; X86-NEXT: movl $-1, 8(%eax)
24 ; X86-NEXT: movl $-1, 4(%eax)
25 ; X86-NEXT: movl $-1, (%eax)
28 ; X64-LABEL: fold_add_freeze_v4i32:
30 ; X64-NEXT: pcmpeqd %xmm0, %xmm0
32 %1 = insertelement <4 x i32> poison, i32 0, i32 0
33 %2 = shufflevector <4 x i32> %1, <4 x i32> poison, <4 x i32> zeroinitializer
34 %3 = freeze <4 x i32> %2
35 %4 = insertelement <4 x i32> poison, i32 -1, i32 0
36 %5 = shufflevector <4 x i32> %4, <4 x i32> poison, <4 x i32> zeroinitializer
37 %6 = freeze <4 x i32> %5
38 %7 = add <4 x i32> %3, %6