Last active
April 2, 2017 22:36
-
-
Save annanay25/6560a48e3569430d37bff0ae9bc685ec to your computer and use it in GitHub Desktop.
Error free. Run using - "opt -polly-codegen my-expect-causes-issues.ll -polly-process-unprofitable".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'test.ll' | |
source_filename = "bugpoint-output-b434f38.bc" | |
target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" | |
target triple = "x86_64-unknown-linux-gnu" | |
module asm "\09.ident\09\22GCC: (GNU) 4.6.4 LLVM: 3.3.1\22" | |
; Function Attrs: nounwind uwtable | |
define void @quux() unnamed_addr #0 { | |
bb: | |
br label %bb1 | |
bb1: ; preds = %bb | |
%tmp = icmp eq i64 0, 0 | |
br i1 %tmp, label %bb2, label %bb7 | |
bb2: ; preds = %bb1 | |
%tmp3 = add i1 4, 12 | |
%tmp4 = zext i1 %tmp3 to i64 | |
%tmp5 = tail call i64 @llvm.expect.i64(i64 %tmp4, i64 0) | |
%tmp6 = trunc i64 %tmp5 to i32 | |
br label %bb7 | |
bb7: ; preds = %bb2, %bb1 | |
%tmp8 = phi i32 [ undef, %bb2 ], [ 0, %bb1 ] | |
ret void | |
} | |
; Function Attrs: nounwind readnone | |
declare i64 @llvm.expect.i64(i64, i64) #1 | |
attributes #0 = { nounwind uwtable } | |
attributes #1 = { nounwind readnone } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The icmp statement from the test file given in this bug, in line 18, has been replaced with a dummy
add
statement. And the file runs with no issues. Hence, the icmp statement before the llvm.expect clause was causing the error.