mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Fix a README item by having InstructionSimplify do a mild form of value
numbering, in which it considers (for example) "%a = add i32 %x, %y" and "%b = add i32 %x, %y" to be equal because the operands are equal and the result of the instructions only depends on the values of the operands. This has almost no effect (it removes 4 instructions from gcc-as-one-file), and perhaps slows down compilation: I measured a 0.4% slowdown on the large gcc-as-one-file testcase, but it wasn't statistically significant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
9
test/Transforms/InstSimplify/2010-12-31-ValueNumber.ll
Normal file
9
test/Transforms/InstSimplify/2010-12-31-ValueNumber.ll
Normal file
@@ -0,0 +1,9 @@
|
||||
; RUN: opt < %s -instsimplify -S | FileCheck %s
|
||||
define i1 @g(i32 %a) nounwind readnone {
|
||||
; CHECK: @g
|
||||
%add = shl i32 %a, 1
|
||||
%mul = shl i32 %a, 1
|
||||
%cmp = icmp ugt i32 %add, %mul
|
||||
ret i1 %cmp
|
||||
; CHECK: ret i1 false
|
||||
}
|
Reference in New Issue
Block a user