llvm-mirror/test/Other
Wei Mi 58e484f1a9 Fix the issue that ComputeValueKnownInPredecessors only handles the case when
phi is on lhs of a comparison op.

For the following testcase,
L1:

  %t0 = add i32 %m, 7
  %t3 = icmp eq i32* %t2, null
  br i1 %t3, label %L3, label %L2

L2:

  %t4 = load i32, i32* %t2, align 4
  br label %L3

L3:

  %t5 = phi i32 [ %t0, %L1 ], [ %t4, %L2 ]
  %t6 = icmp eq i32 %t0, %t5
  br i1 %t6, label %L4, label %L5

We know if we go through the path L1 --> L3, %t6 should always be true. However
currently, if the rhs of the eq comparison is phi, JumpThreading fails to
evaluate %t6 to true. And we know that Instcombine cannot guarantee always
canonicalizing phi to the left hand side of the comparison operation according
to the operand priority comparison mechanism in instcombine. The patch handles
the case when rhs of the comparison op is a phi.

Differential Revision: https://reviews.llvm.org/D46275

llvm-svn: 331266
2018-05-01 14:47:24 +00:00
..
Inputs
X86
2002-01-31-CallGraph.ll
2002-02-24-InlineBrokePHINodes.ll
2002-03-11-ConstPropCrash.ll
2003-02-19-LoopInfoNestingBug.ll
2004-08-16-PackedConstantInlineStore.ll
2004-08-16-PackedGlobalConstant.ll
2004-08-16-PackedSelect.ll
2004-08-16-PackedSimple.ll
2004-08-20-PackedControlFlow.ll
2006-02-05-PassManager.ll
2007-04-24-eliminate-mostly-empty-blocks.ll
2007-06-05-PassID.ll
2007-06-28-PassManager.ll
2007-09-10-PassManager.ll
2008-02-14-PassManager.ll
2008-06-04-FieldSizeInPacked.ll
2008-10-06-RemoveDeadPass.ll
2008-10-15-MissingSpace.ll
2009-03-31-CallGraph.ll
2009-06-05-no-implicit-float.ll
2009-09-14-function-elements.ll
2010-05-06-Printer.ll
attribute-comment.ll
bcanalyzer-block-info.txt
can-execute.txt REQUIRES: shell a couple of tests that require the shell 2018-02-10 00:14:54 +00:00
cgscc-devirt-iteration.ll [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass 2018-03-23 21:46:16 +00:00
cgscc-disconnected-invalidation.ll
cgscc-iterate-function-mutation.ll
cgscc-libcall-update.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
cgscc-observe-devirt.ll
cleanup-lcssa.ll
close-stderr.ll
constant-fold-gep-address-spaces.ll
constant-fold-gep.ll
debugcounter-earlycse.ll [EarlyCSE] Add debug counter for debugging mis-optimizations. NFC. 2018-04-06 18:47:33 +00:00
debugcounter-newgvn.ll
debugcounter-predicateinfo.ll
extract-alias.ll
extract-linkonce.ll
extract-weak-odr.ll
extract.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
FileCheck-space.txt
invalid-commandline-option.ll
invariant.group.barrier.ll
lint.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
lit-globbing.ll Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
lit-quoting.txt
lit-unicode.txt
llvm-nm-without-aliases.ll
loop-pass-ordering.ll
loop-pass-printer.ll IR printing improvement for loop passes - handle -print-module-scope 2017-12-01 18:33:58 +00:00
loop-pm-invalidation.ll [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
new-pass-manager.ll [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
new-pm-defaults.ll Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
new-pm-lto-defaults.ll Recommit r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call. 2018-02-14 13:59:12 +00:00
new-pm-pgo.ll
new-pm-thinlto-defaults.ll Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
opt-bisect-helper.py
opt-bisect-legacy-pass-manager.ll [lit] Fix several Python 2/3 compatibility issues and tests 2018-04-07 00:21:28 +00:00
opt-O0-pipeline.ll [test] Allow for optional No-Op Barrier Pass in O0 pipeline 2018-03-23 12:47:54 +00:00
opt-O2-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-O3-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-Os-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-override-mcpu-mattr.ll
opt-twice.ll
optimization-remarks-inline.ll
optimization-remarks-invalidation.ll
optimization-remarks-lazy-bfi.ll
optimize-options.ll
pass-pipeline-parsing.ll
pass-pipelines.ll Re-commit : [PowerPC] Add handling for ColdCC calling convention and a pass to mark 2018-01-30 16:17:22 +00:00
pipefail.txt
pr32085.ll Fix the issue that ComputeValueKnownInPredecessors only handles the case when 2018-05-01 14:47:24 +00:00
print-module-scope.ll IR printing improvement for function passes - introducing -print-module-scope 2017-12-01 17:42:46 +00:00
ResponseFile.ll
spir_cc.ll
statistic.ll
umask.ll
writing-to-stdout.ll