Mercurial > hg > CbC > CbC_llvm
view llvm/test/Transforms/GlobalOpt/storepointer-compare.ll @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
line wrap: on
line source
; RUN: opt < %s -globalopt -S | FileCheck %s ; CHECK: call void @Actual ; Check that a comparison does not prevent an indirect call from being made ; direct. The global will still remain, but indirect call elim is still good. @G = internal global void ()* null ; <void ()**> [#uses=2] define internal void @Actual() { ret void } define void @init() { store void ()* @Actual, void ()** @G ret void } define void @doit() { %FP = load void ()*, void ()** @G ; <void ()*> [#uses=2] %CC = icmp eq void ()* %FP, null ; <i1> [#uses=1] br i1 %CC, label %isNull, label %DoCall DoCall: ; preds = %0 call void %FP( ) ret void isNull: ; preds = %0 ret void }