aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/AVR/stdwstk.ll
blob: 8cafa751e6adf56e6e24b6e32f980d046f120bf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llc < %s -mtriple=avr -mcpu=atmega328 -O1 -verify-machineinstrs | FileCheck %s
; CHECK-NOT: stdwstk

; Checks that we expand STDWSPQRr always - even if it appears outside of the
; FrameSetup/FrameDestroy context.

declare { } @foo(i128, i128) addrspace(1)

define i128 @bar(i128 %a, i128 %b) addrspace(1) {
  %b_neg = icmp slt i128 %b, 0
  %divisor = select i1 %b_neg, i128 0, i128 %b
  %result = tail call fastcc addrspace(1) { } @foo(i128 undef, i128 %divisor)

  ret i128 0
}