view test/CodeGen/X86/scalar-min-max-fill-operand.ll @ 33:e4204d083e25

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children
line wrap: on
line source

; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
; CHECK-NOT:     {{(min|max|mov)}}
; CHECK:     mov
; CHECK-NOT:     {{(min|max|mov)}}
; CHECK:     min
; CHECK-NOT:     {{(min|max|mov)}}
; CHECK:     mov
; CHECK-NOT:     {{(min|max|mov)}}
; CHECK:     max
; CHECK-NOT:     {{(min|max|mov)}}

declare float @bar()

define float @foo(float %a) nounwind
{
  %s = call float @bar()
  %t = fcmp olt float %s, %a
  %u = select i1 %t, float %s, float %a
  ret float %u
}
define float @hem(float %a) nounwind
{
  %s = call float @bar()
  %t = fcmp ogt float %s, %a
  %u = select i1 %t, float %s, float %a
  ret float %u
}