https://bugs.kde.org/show_bug.cgi?id=523790
Bug ID: 523790
Summary: s390: inefficient IR generated for branch insn
Classification: Developer tools
Product: valgrind
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: vex
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
I ran into this by accident. Reproduce like so:
In the root of the source tree:
./auxprogs/s390-runone -t -i "brc 3,0" > brc.c
./auxprogs/s390-runone -b brc.c
./vg-in-place --tool=none --trace-notbelow=0 --trace-flags=11111111 ./brc 2>
brc.trace
In brc.trace we see
------------------------ After pre-instr IR optimisation ------
IRSB {
......
------ IMark(0x10000B0, 4, 0) ------
t1 = GET:I64(736)
t2 = GET:I64(744)
t3 = GET:I64(752)
t4 = GET:I64(760)
t64 = s390_calculate_cond[mcx=0x13]{0x80013f9c0}(0x3:I64,t1,t2,t3,t4):I32
t6 = CmpNE32(t64,0x0:I32)
t65 = Not1(t6)
if (t65) { PUT(720) = 0x10000B4:I64; exit-Boring }
------ IMark(0x10000B0, 4, 0) ------
IR-NoOp
IR-NoOp
t67 = t65
if (t67) { PUT(720) = 0x10000B4:I64; exit-Boring }
------ IMark(0x10000B0, 4, 0) ------
IR-NoOp
IR-NoOp
t69 = t65
if (t69) { PUT(720) = 0x10000B4:I64; exit-Boring }
------ IMark(0x10000B0, 4, 0) ------
IR-NoOp
IR-NoOp
t71 = t65
if (t71) { PUT(720) = 0x10000B4:I64; exit-Boring }
------ IMark(0x10000B0, 4, 0) ------
IR-NoOp
IR-NoOp
t73 = t65
if (t73) { PUT(720) = 0x10000B4:I64; exit-Boring }
------ IMark(0x10000B0, 4, 0) ------
IR-NoOp
IR-NoOp
t77 = t65
if (t77) { PUT(720) = 0x10000B4:I64; exit-Boring }
------ IMark(0x10000B0, 4, 0) ------
IR-NoOp
IR-NoOp
t79 = t65
if (t79) { PUT(720) = 0x10000B4:I64; exit-Boring }
PUT(720) = 0x10000B0:I64; exit-Boring
}
Surely, one if (txxx) { PUT(720) = 0x10000B4:I64; exit-Boring }
will be sufficient. We don't need 8 of those.
BRC is a widely used insn and I do not recall having seen above nonsense in the
wild.
So this may well be specific to the way the testcase is crafted.
--
You are receiving this mail because:
You are watching all bug changes.