Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: test/Transforms/InstCombine/add4.ll

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/Transforms/GlobalOpt/alias-used.ll ('k') | test/Transforms/LoopUnroll/scevunroll.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; RUN: opt < %s -instcombine -S | FileCheck %s 1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2 2
3 ;; Target triple for gep raising case below. 3 ;; Target triple for gep raising case below.
4 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3 2:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" 4 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3 2:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
5 target triple = "i686-apple-darwin8" 5 target triple = "i686-apple-darwin8"
6 6
7 define float @test1(float %A, float %B, i1 %C) { 7 define float @test1(float %A, float %B, i1 %C) {
8 EntryBlock: 8 EntryBlock:
9 ;; A*(1 - uitofp i1 C) -> select C, 0, A 9 ;; A*(1 - uitofp i1 C) -> select C, 0, A
10 %cf = uitofp i1 %C to float 10 %cf = uitofp i1 %C to float
(...skipping 20 matching lines...) Expand all
31 %cf = uitofp i1 %C to float 31 %cf = uitofp i1 %C to float
32 %mc = fsub float 1.000000e+00, %cf 32 %mc = fsub float 1.000000e+00, %cf
33 %p1 = fmul fast float %A, %mc 33 %p1 = fmul fast float %A, %mc
34 %p2 = fmul fast float %B, %cf 34 %p2 = fmul fast float %B, %cf
35 %s1 = fadd fast float %p1, %p2 35 %s1 = fadd fast float %p1, %p2
36 ret float %s1 36 ret float %s1
37 ; CHECK: @test3 37 ; CHECK: @test3
38 ; CHECK: select i1 %C, float %B, float %A 38 ; CHECK: select i1 %C, float %B, float %A
39 } 39 }
40 40
41 ; PR15952
42 define float @test4(float %A, float %B, i32 %C) {
43 %cf = uitofp i32 %C to float
44 %mc = fsub float 1.000000e+00, %cf
45 %p1 = fmul fast float %A, %mc
46 ret float %p1
47 ; CHECK: @test4
48 ; CHECK: uitofp
49 }
50
51 define float @test5(float %A, float %B, i32 %C) {
52 %cf = uitofp i32 %C to float
53 %p2 = fmul fast float %B, %cf
54 ret float %p2
55 ; CHECK: @test5
56 ; CHECK: uitofp
57 }
58
OLDNEW
« no previous file with comments | « test/Transforms/GlobalOpt/alias-used.ll ('k') | test/Transforms/LoopUnroll/scevunroll.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698