]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/Transforms/InstCombine/2002-05-14-SubFailure.ll
[canonicalize] Teach InstCombine to canonicalize loads which are only
[opencl/llvm.git] / test / Transforms / InstCombine / 2002-05-14-SubFailure.ll
1 ; Instcombine was missing a test that caused it to make illegal transformations
2 ; sometimes.  In this case, it transforms the sub into an add:
3 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 ; CHECK: sub
6 define i32 @test(i32 %i, i32 %j) {
7         %A = mul i32 %i, %j
8         %B = sub i32 2, %A
9         ret i32 %B
10 }