hws/hw09.tex
changeset 648 36379b038438
parent 647 180600c04da2
child 649 e83afb44f276
--- a/hws/hw09.tex	Fri Oct 04 11:21:30 2019 +0100
+++ b/hws/hw09.tex	Mon Oct 07 20:53:25 2019 +0100
@@ -45,6 +45,23 @@
 \end{lstlisting}
 
 
+\item What does the following LLVM function calculate. Give the
+
+\begin{lstlisting}[language=LLVM,numbers=none]  
+define i32 @foo(i32 %a, i32 %b)  {
+  %1 = mul i32 %a, %a
+  %2 = mul i32 %a, 2
+  %3 = mul i32 %2, %b
+  %4 = add i32 %1, %3
+  %5 = mul i32 %b, %b
+  %6 = add i32 %5, %4
+  ret i32 %6
+}
+\end{lstlisting}
+
+  
+
+
 
 \item \POSTSCRIPT