1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/CodeGen/X86/simple-zext.ll
Tim Northover d0b90ac5a7 DAGCombiner: fix use-counting issue when forming zextload
DAGCombiner was counting all uses of a load node  when considering whether it's
worth combining into a zextload. Really, it wants to ignore the chain and just
count real uses.

rdar://problem/13896307

llvm-svn: 185419
2013-07-02 09:58:53 +00:00

17 lines
448 B
LLVM

; RUN: llc -mtriple=x86_64-apple-darwin < %s| FileCheck %s
; A bug in DAGCombiner prevented it forming a zextload in this simple case
; because it counted both the chain user and the real user against the
; profitability total.
define void @load_zext(i32* nocapture %p){
entry:
%0 = load i32* %p, align 4
%and = and i32 %0, 255
tail call void @use(i32 %and)
ret void
; CHECK: movzbl ({{%r[a-z]+}}), {{%e[a-z]+}}
}
declare void @use(i32)