xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/wide-integer-fold.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; CHECK:  movq  $-65535, %rax
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; DAGCombiner should fold this to a simple constant.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine i64 @foo(i192 %a) nounwind {
7*9880d681SAndroid Build Coastguard Worker  %t = or i192 %a, -22300404916163702203072254898040925442801665
8*9880d681SAndroid Build Coastguard Worker  %s = and i192 %t, -22300404916163702203072254898040929737768960
9*9880d681SAndroid Build Coastguard Worker  %u = lshr i192 %s, 128
10*9880d681SAndroid Build Coastguard Worker  %v = trunc i192 %u to i64
11*9880d681SAndroid Build Coastguard Worker  ret i64 %v
12*9880d681SAndroid Build Coastguard Worker}
13