xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/2006-02-13-DemandedMiscompile.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -instcombine -S | \
2*9880d681SAndroid Build Coastguard Worker; RUN:   not grep undef
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workerdefine i32 @test(i8 %A) {
5*9880d681SAndroid Build Coastguard Worker        %B = sext i8 %A to i32          ; <i32> [#uses=1]
6*9880d681SAndroid Build Coastguard Worker        %C = ashr i32 %B, 8             ; <i32> [#uses=1]
7*9880d681SAndroid Build Coastguard Worker        ret i32 %C
8*9880d681SAndroid Build Coastguard Worker}
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker
11