view test/CodeGen/X86/2010-11-18-SelectOfExtload.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 afa8332a0e37
line wrap: on
line source

; RUN: llc < %s -march=x86 -mattr=+cmov | FileCheck %s
; Both values were being zero extended.
@u = external global i8
@s = external global i8
define i32 @foo(i1 %cond) {
; CHECK: @foo
  %u_base = load i8* @u
  %u_val = zext i8 %u_base to i32
; CHECK: movzbl
; CHECK: movsbl
  %s_base = load i8* @s
  %s_val = sext i8 %s_base to i32
  %val = select i1 %cond, i32 %u_val, i32 %s_val
  ret i32 %val
}