Issue |
152630
|
Summary |
[SDAG][X86] Miscompilation at -O3
|
Labels |
backend:X86,
miscompilation,
llvm:SelectionDAG,
generated by fuzzer
|
Assignees |
dtcxzyw
|
Reporter |
dtcxzyw
|
Reproducer:
```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@g_3 = global i8 0
@.str.62 = constant [7 x i8] c"hello\0A\00"
define i32 @main() {
entry:
%load = load i8, ptr @g_3, align 1
%.b3433 = trunc i8 %load to i1
%0 = select i1 %.b3433, i32 0, i32 -1
%conv6.i.i.i = trunc nsw i32 %0 to i8
switch i8 %conv6.i.i.i, label %if.then.i337.i.i [
i8 -1, label %common.ret
i8 0, label %common.ret
]
common.ret: ; preds = %if.then.i337.i.i, %entry, %entry
ret i32 0
if.then.i337.i.i: ; preds = %entry
%call.i3264 = tail call i32 (ptr, ...) @printf(ptr @.str.62)
br label %common.ret
}
declare i32 @printf(ptr, ...)
```
```
> lli reduced.ll
hello
```
llvm version: 3769ce013be2879bf0b329c14a16f5cb766f26ce
Reported in https://github.com/dtcxzyw/llvm-fuzz-service/issues/112.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs