[PATCH] D17786: [X86] Enable forwarding bool arguments in tail calls (PR26305)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 2 11:03:40 PST 2016
hans added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:3666
@@ +3665,3 @@
+
+ break;
+ }
----------------
rnk wrote:
> Maybe a `do { ... } while (false)` loop is appropriate here?
But then continue won't work?
================
Comment at: test/CodeGen/X86/tail-call-bools.ll:1
@@ +1,2 @@
+; RUN: llc -mtriple=i686-unknown-linux-gnu -o - %s | FileCheck %s
+
----------------
rnk wrote:
> Can you also run this in x86_64? The f_i32 guy will have to do `movss %rcx, %xmm0` or something.
>
> Also, maybe `tail-call-casts.ll` is a better name for the test, since it's not all about bools.
My change doesn't affect tail call arguments passed in registers, so is mostly not relevant for x86_64.
I do want to look into x86_64 in a follow-up though. For bools, we currently generate:
```
movzbl %dil, %edi
jmp g_bool
```
i.e. we do make the tail call, but we don't recognize that the argument can be forwarded as-is. The float bitcast test will come in handy to check that we don't mess that up.
I've renamed the test case.
http://reviews.llvm.org/D17786
More information about the llvm-commits
mailing list