brintos

brintos / llvm-project-archived public Read only

0
0
Text · 896 B · 7fc1ed3 Raw
26 lines · plain
1; RUN: llc -mtriple=i686-unknown-linux-gnu -enable-misched=false < %s | FileCheck %s2 3define fastcc i8 @fold32to8(i32 %add, i8 %spill) {4; CHECK-LABEL: fold32to8:5; CHECK:    movl %ecx, (%esp) # 4-byte Spill6; CHECK:    subb (%esp), %dl  # 1-byte Folded Reload7entry:8  tail call void asm sideeffect "", "~{eax},~{ebx},~{ecx},~{edi},~{esi},~{ebp},~{dirflag},~{fpsr},~{flags}"()9  %trunc = trunc i32 %add to i810  %sub = sub i8 %spill, %trunc11  ret i8 %sub12}13 14; Do not fold a 1-byte store into a 4-byte spill slot15define fastcc i8 @nofold(i32 %add, i8 %spill) {16; CHECK-LABEL: nofold:17; CHECK:    movl %edx, (%esp) # 4-byte Spill18; CHECK:    movl (%esp), %eax # 4-byte Reload19; CHECK:    subb %cl, %al20entry:21  tail call void asm sideeffect "", "~{eax},~{ebx},~{edx},~{edi},~{esi},~{ebp},~{dirflag},~{fpsr},~{flags}"()22  %trunc = trunc i32 %add to i823  %sub = sub i8 %spill, %trunc24  ret i8 %sub25}26