1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Transforms/InstSimplify/bitreverse.ll
Eric Christopher a62270de2c Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
2019-04-17 04:52:47 +00:00

32 lines
671 B
LLVM

; RUN: opt < %s -S -instsimplify | FileCheck %s
declare i32 @llvm.bitreverse.i32(i32)
; CHECK-LABEL: @test1(
; CHECK: ret i1 false
define i1 @test1(i32 %arg) {
%a = or i32 %arg, 1
%b = call i32 @llvm.bitreverse.i32(i32 %a)
%res = icmp eq i32 %b, 0
ret i1 %res
}
; CHECK-LABEL: @test2(
; CHECK: ret i1 false
define i1 @test2(i32 %arg) {
%a = or i32 %arg, 1024
%b = call i32 @llvm.bitreverse.i32(i32 %a)
%res = icmp eq i32 %b, 0
ret i1 %res
}
; CHECK-LABEL: @test3(
; CHECK: ret i1 false
define i1 @test3(i32 %arg) {
%a = and i32 %arg, 1
%b = call i32 @llvm.bitreverse.i32(i32 %a)
%and = and i32 %b, 1
%res = icmp eq i32 %and, 1
ret i1 %res
}