https://llvm.org/bugs/show_bug.cgi?id=28965
Bug ID: 28965 Summary: [AArch64] missed opportunity to use conditional select invert (csinv) Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Backend: AArch64 Assignee: unassignedb...@nondot.org Reporter: spatel+l...@rotateright.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Forking this off of bug 28964: define i32 @goo(i32 %x) { %cmp = icmp eq i32 %x, 1 %sel = select i1 %cmp, i32 1, i32 -1 %call = tail call i32 @bar(i32 %sel) ret i32 %call } declare i32 @bar(i32) $ ./llc -o - selcall.ll -mtriple=aarch64 ... cmp w0, #1 // =1 orr w8, wzr, #0x1 cneg w0, w8, ne b bar gcc 4.8 on godbolt ( https://godbolt.org/g/BW5RJu ) shows: foo(int): cmp w0, 1 csinv w0, w0, wzr, eq b bar(int) -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs