brintos

brintos / llvm-project-archived public Read only

0
0
Text · 567 B · 681fe01 Raw
22 lines · plain
1; There should be NO references to the global v1.  The local v1 should2; have all of the references!3;4; Check by running globaldce, which will remove the constant if there are5; no references to it!6;7; RUN: opt < %s -passes=globaldce -S | FileCheck %s8;9; RUN: verify-uselistorder %s10 11; CHECK-NOT: constant12; CHECK-NOT: @v113 14@v1 = internal constant i32 515 16define i32 @createtask() {17        %v1 = alloca i32                ;; Alloca should have one use!18        %reg112 = load i32, ptr %v1         ;; This load should not use the global!19        ret i32 %reg11220}21 22