llvm.org GIT mirror llvm / 0db3a4f
[NewGVN] Add CL option to control the generation of phi-of-ops (disable by default). Differential Revision: https://reviews.llvm.org/D36478539 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310594 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 2 years ago
4 changed file(s) with 10 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
125125 // issue.
126126 static cl::opt EnableStoreRefinement("enable-store-refinement",
127127 cl::init(false), cl::Hidden);
128
129 /// Currently, the generation "phi of ops" can result in correctness issues.
130 static cl::opt EnablePhiOfOps("enable-phi-of-ops", cl::init(false),
131 cl::Hidden);
128132
129133 //===----------------------------------------------------------------------===//
130134 // GVN Pass
24412445 }
24422446
24432447 static bool okayForPHIOfOps(const Instruction *I) {
2448 if (!EnablePhiOfOps)
2449 return false;
24442450 return isa(I) || isa(I) || isa(I) ||
24452451 isa(I);
24462452 }
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1 ; RUN: opt < %s -basicaa -newgvn -S | FileCheck %s
1 ; RUN: opt < %s -basicaa -newgvn -enable-phi-of-ops=true -S | FileCheck %s
22 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
33
44 define i32 @test1(i32, i8**) {
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
11 ;; Ensure the store verifier is not overzealous
2 ; RUN: opt -newgvn -S %s | FileCheck %s
2 ; RUN: opt -newgvn -enable-phi-of-ops=true -S %s | FileCheck %s
33 @b = external global i16, align 2
44
55 define void @patatino() {
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1 ; RUN: opt -newgvn -S < %s | FileCheck %s
2 ; RUN: opt -passes=newgvn -S -o - %s | FileCheck %s
1 ; RUN: opt -newgvn -enable-phi-of-ops=true -S < %s | FileCheck %s
2 ; RUN: opt -passes=newgvn -enable-phi-of-ops=true -S -o - %s | FileCheck %s
33
44 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
55