[PATCH] D18528: Don't fold double constant to an integer if dest type not integral
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 09:49:09 PDT 2016
tejohnson added a comment.
Thanks for the review!
> LGTM, but the test shouldn't be in CodeGen. It's not great either, but what about Transforms/EarlyCSE?
The bug isn't specific to EarlyCSE either (I originally found this when folding was invoked from the inliner). I wasn't sure where to put this but there are already a bunch of X86 constant folding tests in CodeGen/X86. It seemed consistent with past tests to put it there. Ok if I leave it there?
================
Comment at: test/CodeGen/X86/mmx-bitcast-fold.ll:1
@@ +1,2 @@
+; RUN: opt -mtriple=x86_64-linux-gnu -early-cse < %s -S | FileCheck %s
+
----------------
ab wrote:
> Perhaps x86_64-- ?
Good idea.
================
Comment at: test/CodeGen/X86/mmx-bitcast-fold.ll:5
@@ +4,3 @@
+
+define internal void @bar() {
+entry:
----------------
ab wrote:
> -internal
done
================
Comment at: test/CodeGen/X86/mmx-bitcast-fold.ll:8
@@ +7,3 @@
+ %0 = bitcast double 0.0 to x86_mmx
+ %1 = tail call x86_mmx @foo(x86_mmx %0)
+ ret void
----------------
ab wrote:
> -tail
done
http://reviews.llvm.org/D18528
More information about the llvm-commits
mailing list