SimplifyCFG currently transforms the following IR
if.then:
%0 = call i32 asm "rorl $2, $0", "=&r,0,n,~{dirflag},~{fpsr},~{flags}"(i32 %r6, i32 8)
br label %if.end
if.else:
%1 = call i32 asm "rorl $2, $0", "=&r,0,n,~{dirflag},~{fpsr},~{flags}"(i32 %r6, i32 6)
br label %if.endinto this IR:
%tobool = icmp eq i32 %c, 0
%.sink = select i1 %tobool, i32 6, i32 8
%0 = call i32 asm "rorl $2, $0", "=&r,0,n,~{dirflag},~{fpsr},~{flags}"(i32 %r6, i32 %.sink)This is bad because constraint "n" expects an immediate integer operand and merging the instructions causes a crash in the backend printing the following error message:
error: invalid operand for inline asm constraint 'n'
This patch fixes the crash by conservatively disabling the transformation when the instructions to be moved are inline-asm instructions.
I'd mention the constraint issue, it quickly explains why this is needed.