mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
0ee8edb96e
This reverts commit r276700 and reapplies r276698. The relevant clang tests have been updated. llvm-svn: 276727
28 lines
508 B
LLVM
28 lines
508 B
LLVM
; RUN: opt -S -instsimplify < %s | FileCheck %s
|
|
|
|
define i1 @test1(i1 %V) {
|
|
entry:
|
|
%Z = zext i1 %V to i32
|
|
%T = trunc i32 %Z to i1
|
|
ret i1 %T
|
|
; CHECK-LABEL: define i1 @test1(
|
|
; CHECK: ret i1 %V
|
|
}
|
|
|
|
define i8* @test2(i8* %V) {
|
|
entry:
|
|
%BC1 = bitcast i8* %V to i32*
|
|
%BC2 = bitcast i32* %BC1 to i8*
|
|
ret i8* %BC2
|
|
; CHECK-LABEL: define i8* @test2(
|
|
; CHECK: ret i8* %V
|
|
}
|
|
|
|
define i8* @test3(i8* %V) {
|
|
entry:
|
|
%BC = bitcast i8* %V to i8*
|
|
ret i8* %BC
|
|
; CHECK-LABEL: define i8* @test3(
|
|
; CHECK: ret i8* %V
|
|
}
|