Weirdness w/ llvm control flow graph generation

I am working on implementing break/continue and the flow control graphs
that I am seeing are having all sorts of weird flow control that does
not necessarily exist in the IR representation. For, example, a simple
code segment that is a while loop w/ a continue ends up generating a CFG
that is two while loops with one embedded inside each other. I've
attached the dot files and the IR code. Any help with figuring out what
is causing this craziness would be greatly appreciated.

It was compiled with:

llvm-as < float/test_fc_while_continue_gt.ll | opt -std-compile-opts
-loopsimplify -simplifycfg -print-cfg >

llc -march=mybackend float/test_fc_while_continue_gt.bc

Thanks for your time.

Micah Villmow

Systems Engineer

Advanced Technology & Performance

Advanced Micro Devices Inc.

4555 Great America Pkwy,

Santa Clara, CA. 95054

P: 408-572-6219

F: 408-572-6596 (1.63 KB) (1.35 KB)

test_fc_while_continue_gt.ll (1.87 KB)