[dragonegg] r220139 - Remove a bad test. The GEP has nothing to do with devirtualization, it
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Oct 20 15:26:49 PDT 2014
For what it is worth, dragonegg is producing:
define void @_Z1g1S(%struct.S* noalias %s) unnamed_addr #0 {
entry:
%0 = bitcast %struct.S* %s to void (%struct.S*)***
%1 = load void (%struct.S*)*** %0, align 8, !tbaa !0
%2 = load void (%struct.S*)** %1, align 8, !tbaa !0
tail call void %2(%struct.S* %s)
ret void
}
and clang
define void @_Z1g1S(%struct.S* %s) #0 {
%1 = bitcast %struct.S* %s to i8**
%2 = load i8** %1, align 8, !tbaa !1
%3 = bitcast i8* %2 to void (%struct.S*)**
%4 = load void (%struct.S*)** %3, align 8
tail call void %4(%struct.S* %s)
ret void
}
On 18 October 2014 03:43, Chandler Carruth <chandlerc at gmail.com> wrote:
> Author: chandlerc
> Date: Sat Oct 18 02:43:30 2014
> New Revision: 220139
>
> URL: http://llvm.org/viewvc/llvm-project?rev=220139&view=rev
> Log:
> Remove a bad test. The GEP has nothing to do with devirtualization, it
> has to do with pointer manipulation. I'm not 100% certain what IR
> dragonegg is generating, but if anyone is super attached to this test
> case they should add it back with proper FileCheck-ing of the actual IR
> relevant to devirtualization (the load of the function pointer from the
> vtable).
>
> I'm just nuking it for now to get the build bot green. I may take a look
> at whether I can convince dragonegg to build so I can check what it
> actually outputs, but no guarantee.
>
> Removed:
> dragonegg/trunk/test/validator/c++/ptr-to-method-devirt.cpp
>
> Removed: dragonegg/trunk/test/validator/c++/ptr-to-method-devirt.cpp
> URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/validator/c%2B%2B/ptr-to-method-devirt.cpp?rev=220138&view=auto
> ==============================================================================
> --- dragonegg/trunk/test/validator/c++/ptr-to-method-devirt.cpp (original)
> +++ dragonegg/trunk/test/validator/c++/ptr-to-method-devirt.cpp (removed)
> @@ -1,14 +0,0 @@
> -// PR1602
> -// RUN: %dragonegg -S %s -o - -O3 | not grep ptrtoint
> -// RUN: %dragonegg -S %s -o - -O3 | grep getelementptr | count 1
> -
> -
> -struct S { virtual void f(); };
> -
> -typedef void (S::*P)(void);
> -
> -const P p = &S::f;
> -
> -void g(S s) {
> - (s.*p)();
> - }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list