https://llvm.org/bugs/show_bug.cgi?id=27500
Bug ID: 27500
Summary: [MSP430] codegen: strange branch instructions
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: MSP430
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 16256
--> https://llvm.org/bugs/attachment.cgi?id=16256&action=edit
original.ll (does not trigger error)
When original.ll is optimized with `opt -O3` then llc generates strange
conditional branch instructions that look like this:
.LBB0_4: ; %if.then26
cmp.b #126, r7
jne 4
br #.LBB0_57
.LBB0_5: ; %cond.end38
mov.w #1, r13
mov.b r7, r6
and.b #63, r6
"jne 4" instruction is then compiled by gcc into "jnz $+6" and in result we are
jumping over "mov.w #1, r13".
steps to reproduce:
$ opt -O3 original.ll -o optimized.bc
$ llc optimized.bc -o optimized.s
$ cat optimized.s | grep 'j.*\t4'
jne 4
jne 4
software versions:
(http://llvm.org/git/llvm.git 822155bcb5ae5fc09d4448b862758631c9378a3b)
LLVM (http://llvm.org/):
LLVM version 3.9.0svn
DEBUG build with assertions.
Built Apr 24 2016 (08:41:34).
Default target: x86_64-apple-darwin15.4.0
Host CPU: haswell
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs