xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/simple-zext.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin < %s| FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; A bug in DAGCombiner prevented it forming a zextload in this simple case
4*9880d681SAndroid Build Coastguard Worker; because it counted both the chain user and the real user against the
5*9880d681SAndroid Build Coastguard Worker; profitability total.
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @load_zext(i32* nocapture %p){
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* %p, align 4
10*9880d681SAndroid Build Coastguard Worker  %and = and i32 %0, 255
11*9880d681SAndroid Build Coastguard Worker  tail call void @use(i32 %and)
12*9880d681SAndroid Build Coastguard Worker  ret void
13*9880d681SAndroid Build Coastguard Worker; CHECK: movzbl ({{%r[a-z]+}}), {{%e[a-z]+}}
14*9880d681SAndroid Build Coastguard Worker}
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Workerdeclare void @use(i32)
17