mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-25 05:27:15 +00:00
39f4e8d9cc
This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186268 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
588 B
LLVM
26 lines
588 B
LLVM
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
define i1 @test0(i39 %X, i39 %A) {
|
|
; CHECK-LABEL: @test0(
|
|
; CHECK: %[[V1:.*]] = shl i39 1, %A
|
|
; CHECK: %[[V2:.*]] = and i39 %[[V1]], %X
|
|
; CHECK: %[[V3:.*]] = icmp ne i39 %[[V2]], 0
|
|
; CHECK: ret i1 %[[V3]]
|
|
|
|
%B = lshr i39 %X, %A
|
|
%D = trunc i39 %B to i1
|
|
ret i1 %D
|
|
}
|
|
|
|
define i1 @test1(i799 %X, i799 %A) {
|
|
; CHECK-LABEL: @test1(
|
|
; CHECK: %[[V1:.*]] = shl i799 1, %A
|
|
; CHECK: %[[V2:.*]] = and i799 %[[V1]], %X
|
|
; CHECK: %[[V3:.*]] = icmp ne i799 %[[V2]], 0
|
|
; CHECK: ret i1 %[[V3]]
|
|
|
|
%B = lshr i799 %X, %A
|
|
%D = trunc i799 %B to i1
|
|
ret i1 %D
|
|
}
|