24 lines
826 B
LLVM
24 lines
826 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -S -passes='function(early-cse),globalopt' < %s | FileCheck %s
|
|
; RUN: opt -S -passes='function(early-cse)' < %s | opt -S -passes=globalopt | FileCheck %s
|
|
|
|
@g = internal global [6 x i16*] undef
|
|
|
|
define void @test1() {
|
|
; CHECK-LABEL: @test1(
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%xor4 = xor i32 zext (i1 icmp ne (i8* getelementptr (i8, i8* bitcast ([6 x i16*]* @g to i8*), i64 3), i8* null) to i32), 0
|
|
%t0 = load i16*, i16** bitcast (i8* getelementptr (i8, i8* bitcast ([6 x i16*]* @g to i8*), i64 3) to i16**), align 1
|
|
%t1 = load i16, i16* %t0, align 1
|
|
ret void
|
|
}
|
|
|
|
define void @test2() {
|
|
; CHECK-LABEL: @test2(
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
store i16* null, i16** getelementptr inbounds ([6 x i16*], [6 x i16*]* @g, i32 0, i32 5)
|
|
ret void
|
|
}
|