You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
@ -1,32 +0,0 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -instsimplify -S | FileCheck %s
|
||||
|
||||
; Test constant fold of constant expression GEP used by ptrtoint (the
|
||||
; "offsetof-like expression" case).
|
||||
; This used to hit an assert due to not supporting vectors in
|
||||
; llvm::ConstantFoldCastInstruction when handling ptrtoint.
|
||||
define <2 x i16> @test1() {
|
||||
; CHECK-LABEL: @test1(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: ret <2 x i16> ptrtoint (<2 x i32*> getelementptr ([10 x i32], [10 x i32]* null, <2 x i64> zeroinitializer, <2 x i64> <i64 5, i64 7>) to <2 x i16>)
|
||||
;
|
||||
entry:
|
||||
%gep = getelementptr inbounds [10 x i32], [10 x i32]* null, i16 0, <2 x i16> <i16 5, i16 7>
|
||||
%vec = ptrtoint <2 x i32*> %gep to <2 x i16>
|
||||
ret <2 x i16> %vec
|
||||
}
|
||||
|
||||
; Test constant fold of constant expression GEP used by ptrtoint (the
|
||||
; "sizeof-like expression" case).
|
||||
; This used to hit an assert due to not supporting vectors in
|
||||
; llvm::ConstantFoldCastInstruction when handling ptrtoint.
|
||||
define <2 x i16> @test2() {
|
||||
; CHECK-LABEL: @test2(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: ret <2 x i16> ptrtoint (<2 x i32*> getelementptr (i32, i32* null, <2 x i64> <i64 5, i64 7>) to <2 x i16>)
|
||||
;
|
||||
entry:
|
||||
%gep = getelementptr i32, i32* null, <2 x i16> <i16 5, i16 7>
|
||||
%vec = ptrtoint <2 x i32*> %gep to <2 x i16>
|
||||
ret <2 x i16> %vec
|
||||
}
|
Reference in New Issue
Block a user