llvm.org GIT mirror llvm / 7db21bd
move the PR6214 microoptzn to this file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95299 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
1 changed file(s) with 18 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
935935
936936 //===---------------------------------------------------------------------===//
937937
938 These should compile into the same code (PR6214): Perhaps instcombine should
939 canonicalize the former into the later?
940
941 define float @foo(float %x) nounwind {
942 %t = bitcast float %x to i32
943 %s = and i32 %t, 2147483647
944 %d = bitcast i32 %s to float
945 ret float %d
946 }
947
948 declare float @fabsf(float %n)
949 define float @bar(float %x) nounwind {
950 %d = call float @fabsf(float %x)
951 ret float %d
952 }
953
954 //===---------------------------------------------------------------------===//
955