xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/2004-11-22-Missed-and-fold.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -instcombine -S | not grep and
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine i8 @test21(i8 %A) {
4*9880d681SAndroid Build Coastguard Worker        ;; sign extend
5*9880d681SAndroid Build Coastguard Worker        %C = ashr i8 %A, 7              ; <i8> [#uses=1]
6*9880d681SAndroid Build Coastguard Worker        ;; chop off sign
7*9880d681SAndroid Build Coastguard Worker        %D = and i8 %C, 1               ; <i8> [#uses=1]
8*9880d681SAndroid Build Coastguard Worker        ret i8 %D
9*9880d681SAndroid Build Coastguard Worker}
10*9880d681SAndroid Build Coastguard Worker
11