Files
clang-p2996/llvm/test/Transforms/GlobalOpt/2021-08-02-CastStoreOnceP2I.ll
Bjorn Pettersson 8ebb3eac02 [test] Use -passes syntax when specifying pipeline in some more tests
The legacy PM is deprecated, so update a bunch of lit tests running
opt to use the new PM syntax when specifying the pipeline.
In this patch focus has been put on test cases for ConstantMerge,
ConstraintElimination, CorrelatedValuePropagation, GlobalDCE,
GlobalOpt, SCCP, TailCallElim and PredicateInfo.

Differential Revision: https://reviews.llvm.org/D114516
2021-11-27 09:52:55 +01:00

21 lines
588 B
LLVM

; RUN: opt -passes=globalopt -S < %s | FileCheck %s
; RUN: opt -passes=globalopt -S < %s | FileCheck %s
; This tests the assignemnt of non-pointer to global address
; (assert due to D106589).
@a162 = internal global i16* null, align 1
define void @f363() {
; CHECK-LABEL: @f363(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[TMP0:%.*]] = load i16*, i16** @a162, align 1
; CHECK-NEXT: store i16 0, i16* bitcast (i16** @a162 to i16*), align 1
; CHECK-NEXT: ret void
;
entry:
%0 = load i16*, i16** @a162, align 1
store i16 0, i16* bitcast (i16** @a162 to i16*), align 1
ret void
}