xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/subreg-to-reg-1.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK:     {{leal	.*[)], %e.*}}
4*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: {{leal	.*[)], %e.*}}
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; Don't eliminate or coalesce away the explicit zero-extension!
7*9880d681SAndroid Build Coastguard Worker; This is currently using an leal because of a 3-addressification detail,
8*9880d681SAndroid Build Coastguard Worker; though this isn't necessary; The point of this test is to make sure
9*9880d681SAndroid Build Coastguard Worker; a 32-bit add is used.
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Workerdefine i64 @foo(i64 %a) nounwind {
12*9880d681SAndroid Build Coastguard Worker  %b = add i64 %a, 4294967295
13*9880d681SAndroid Build Coastguard Worker  %c = and i64 %b, 4294967295
14*9880d681SAndroid Build Coastguard Worker  %d = add i64 %c, 1
15*9880d681SAndroid Build Coastguard Worker  ret i64 %d
16*9880d681SAndroid Build Coastguard Worker}
17